> home.ctp, line 16]
> Fatal error: Call to a member function login() on a non-object
>
> Does your code have to be placed in a controller? I'm trying to
> include it in home.ctp
Auth is a component, so yep, as a controller extension it is only
available inside the controller. As a Mike suggested, you can find the
user and log them in from the controller without a http post request,
or you could even just recreate the session that auth expects and then
redirect to another page (not login though).
hth
j
--
jon bennett - www.jben.net - blog.jben.net
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
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
No comments:
Post a Comment