Created
November 13, 2015 17:16
-
-
Save caionorder/a890cdee7b6304fedd4c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?PHP | |
class User extends AppModel{ | |
public $name = 'User'; | |
public function beforeSave($options = array()) { | |
if (isset($this->data[$this->alias]['password'])) { | |
$this->data[$this->alias]['password'] = AuthComponent::password($this->data[$this->alias]['password']); | |
} | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment