Last active
December 12, 2015 01:18
-
-
Save jesalg/4689966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User extends AppModel { | |
public function beforeSave($options = array()) { | |
if (isset($this->data['User']['password'])) { | |
$this->data['User']['password'] = AuthComponent::password($this->data['User']['password'], $this->data['User']['email']); | |
} | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment