Friday, October 1, 2010

Re: Auth component and login() layout

There is no error message - it actually works ok. But the docs for
the Auth component say that code in the login() function won't execute
until after an authorization attempt, so it seems like it shouldn't be
working.

I'm just trying to figure out why it's working if the docs say it
shouldn't.

Thanks.

On Sep 29, 11:29 pm, arro <mangdeeisc...@gmail.com> wrote:
> no problem if we use different layout for that function..
> what is the error message?
>
> On Sep 30, 4:41 am, tekomp <btisch...@gmail.com> wrote:
>
> > I wanted to use a different layout for my login page, so in
> > users_controller.php, I have this:
>
> > function login() {
> >         $this->layout = 'login';
>
> > }
>
> > What's strange though is that according to the Auth component docs,
> > code in the login() function will only execute after authentication is
> > attempted.  So shouldn't it disregard my code within login() and use
> > the default layout if I haven't tried logging in yet?  I'm glad it
> > seems to work ok, but afraid that I might be missing something that
> > will cause the default layout to be displayed when not logged in.
>
> > Any ideas?  Thanks

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

No comments: