Monday, March 30, 2009

Re: How to silently redirects to login page ?

That would be the authError message you are seeing.

You can set it (from AppController::beforeFilter for example) like
this:

$this->Auth->authError = 'Hi, and welcome. Please login before
proceeding.';

I have a habit of setting it to something more friendly than the
default. The direct way to make it disappear is to clear out the
sessions "auth" flash message. I am not sure how to turn it off more
elegantly.


On Mar 30, 7:26 pm, iFeghali <igor.fegh...@gmail.com> wrote:
> Hello,
>
> I have followed [1] to get a simple login form working. Currently when
> a visitor tries to reach '/' one is redirected to the login form,
> which is desirable, but an error message is displayed "You are not
> authorized to access that location.", which is not desirable. Any clue
> how do I prevent this error only in the case where the user is going
> to login ?
>
> Thank you.
>
> [1]http://book.cakephp.org/view/172/Authentication
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

No comments: