Well... i can think of a couple of things... but first:
Fix the typo that's causing the UNEXPECTED T_VARIABLE, it HAS to be
around there, would be helpful if you paste some of the code.
Besides that, make sure you are trying to do something consistent...

- loginAction is where the app WILL take you if you try to reach
content that Auth is guarding... so it should ALWAYS be a page where a
login form resides... or a page stating you are not supposed to be
there and offer to login...
- You HAVE to have a login() function in the users controller, or have
replaced the loginAction properly
- You NEVER should specify an 'allow' on the login() function, it
breaks Auth
- You should 'allow' logout() function (if you are denying the whole
controller by default)
- loginRedirect, as stated on the code...
/**
 * Normally, if a user is redirected to the $loginAction page, the
location they
 * were redirected from will be stored in the session so that they can
be
 * redirected back after a successful login.  If this session value is
not
 * set, the user will be redirected to the page specified in
$loginRedirect.
 *
 * @var mixed
 * @access public
 */
emphasis on the last IF sentence... loginRedirect happens ONLY when
the session variable is NOT SET

As said before, it would be easier to spot something to help if you
paste some of the code. I'll paste mine here, but my app is very
restrictive (none of the content is allowed, the only 'allow' is on
the 'pages' controller and on the login() [EMAIL PROTECTED]

This is how my beforeFilter()@app_controller.php looks like:
/------------------------------------------------------/
function beforeFilter()
{
        $this->Auth->userScope = array('User.deleted' => 0);
        $this->Auth->fields =
array('username'=>'username','password'=>'clave');
        $this->Auth->authenticate = $this;
        $this->Auth->loginError = "Credenciales inválidas";
        $this->Auth->authError = "No puede acceder a este contenido";
        $this->Auth->logoutRedirect = array(Configure::read('Routing.admin')
=> false, 'controller' => 'pages', 'action' => 'display');
        $this->set('user_',$this->Auth->user());

        //pr($this->Auth); <-- THIS you could try to check what's wrong
}

If you have something like this... or want to try it, remember on any
controller that also has a beforeFilter, to call the parents
beforeFilter... example of my users_controller...

function beforeFilter()
{
        parent::beforeFilter();
        $this->Auth->allow('logout');
}
/-------------------------------------------------------------/

HTH,

CG

On Sep 9, 12:12 pm, Tony Thomas <[EMAIL PROTECTED]> wrote:
> If someone is familiar with a post to this group or blog entry that
> addresses this issue, please let me know. I've spent the morning
> scouring both with no satisfactory results.
>
> I have a cakePHP app on a shared server. In local testing, everything
> worked fine. But mod_rewrite did not function properly on the shared
> server, so I'm using CakePHP pretty URLS instead. Also caching (at
> least temporarily) is off. I've uncommented the pertinent lines of
> code in core.php and I've dutifully deleted the .htaccess files.
>
> The problem I have is that after logging in, the redirect is
> inconsistent. About 2/3 of the time I get redirected 
> tohttps://[base_url]/https:/[domain]. I just can't seem to find away
> around this problem.
>
> My login function looks like this:
>
> function login() {
>                         $this->Auth->loginRedirect = array('controller' =>
> 'controller_name', 'action' => 'index');
>     }
>
> I still get inconsistent results with the redirect going to a URL like
> the former example the majority of the time. Any insight, links, etc.
> would be appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to