Tuesday, March 30, 2010

RE: Auth Redirect Issues

Cricket Thanks for trying to help but I already had the logout and
loginredirect vars set. I figured out a workaround...

Here's what my logout procedure looks like.

$this->Session->destroy();
$this->Session->setFlash('Logout successful');
$redirect=$this->Auth->logout();
$this->Session->write('Auth.redirect','');
$this->redirect($redirect);
Since the auth->logout() has a line that deletes the session variable but it
seems to either get set somewhere else based of the referrer or never
actually gets deleted.. so after the logout() I write auth.redirect with a
null string.

-----Original Message-----
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of cricket
Sent: Monday, March 29, 2010 8:09 PM
To: CakePHP
Subject: Re: Auth Redirect Issues

in AppController:
$this->Auth->logoutRedirect = array('controller' => ..., 'action'
=> ...));

On Mar 29, 6:36 pm, "Alan Asher" <a...@asteriskpound.com> wrote:
> Please read carefully, My issue is not with the default behavior of when a
> person is not logged in and tries to reach a page that is auth protected.
 
>
> I am having an issue because after the person hits logout I think that the
> auth component should forget the page I was just on, so when I log in with
a
> different account it doesn't take me back to the page I was just on before
> the logout.
>
> I've tried removing the session variable auth.redirect and it still takes
me
> back to where I was.
>
> How can I get rid of the redirect during the auth->logout?

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to
cake-php+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments: