On Dec 7, 2:46 am, skoggins <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a Flash message that doesn't seem to be displaying across
> controllers. It is called in the beforeFilter of my accounts
> controller:
>
> function __validateLoginStatus()
> {
> //no exceptions for this controller
> if($this->Session->check('CurrentUser') == false)
> {
> $this->redirect('users/index');
> $this->Session->setFlash('The URL you\'ve
> followed requires you
> login.');
> }
>
> }
>
> The same function is in my Users controller (maybe there is a better
> way?) and when attempting to go to a protected page in the Users
> controller the Flash message displays but not when attempting to go to
> a protected page in the Accounts controller. Any ideas?
Why is your setFlash statement after the redirect?
Hint: If your setFlash statement is executed (which it will be) what
else is going to be executed after you send the user somewhere else?
AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---