On May 18, 5:49 pm, rahajiyev <[email protected]> wrote: > Here's my custom validation rule function: > > public function check_current_password($current_password) { > $user = $this->find('first', array('id' => $this->id)); > > debug(AuthComponent::password($current_password)); > debug($user[$this->alias]['password']); exit; > return AuthComponent::password($current_password) == > $user[$this->alias]['password']; > }
I've figured it out. The callback receives data as array, so it should have been return AuthComponent::password($current_password['current_password']) == $user[$this->alias]['password']; -- 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 [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
