Re: Auth Component and user information.
On Jun 7, 2:19 pm, saidbakr <said....@gmail.com> wrote:
> Well, but what about the data in the associated Model Rules? How could
> I get it?
The AuthComponent does not require anything in the User::login()
method. However, if you wish to run some code upon login, you
implement it there.
public function login()
{
if ($user = $this->Auth->user())
{
/* fetch and store your associated data
*/
$this->Session->write(
'Auth.User.whatever',
$this->User->find(...)
);
$this->redirect($this->Auth->loginRedirect);
}
}
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
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home