Hi,
Add the following code to your login action and after that try to go to that
page
if (empty($this->data) && $this->Session->check($this->Auth->sessionKey))
{
$this->redirect($this->Auth->loginRedirect);
}
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Fri, Nov 19, 2010 at 8:16 PM, Juslin Guo <[email protected]> wrote:
> I have a small problem,
>
> 1. After the user login, the user is redirect to the loginRedirect
> url.
> 2. I manually change my link to the login page again, the login page
> pops up again (without me logging out)
>
> How do i avoid that, so that when a user try to hit the login page,
> they will be be diverted to loginRedirect if they are already log in
>
>
>
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>For
> more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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