Re: Auth caches User data in session
I'd like to get currently logged in user info in a model validation
callback. The docs say I can use AuthComponent::user() to get it. But
it returns null.
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html
public $validate = array(
'current_password' => array(
'blahblah => array(
'rule' => 'check_current_password',
'message' => 'Incorrect current
password'),
public function check_current_password($current_password) {
debug(AuthComponent::user()); exit;
}
--
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
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home