How to use Auth in Model
Hello all ,
i am using $this->Auth->password in User model.
it gives error
Notice (8): Undefined property: User::$Auth [APP/models/user.php, line 48]
how can i access Auth in model & How can i encode password before save?
function beforeSave() {
$this->data['User']['password'] = $this->Auth->password($this->data['User']['password']);
return true;
}
Thanks in advance,
Mangesh Sathe
--
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