CakePHP's Auth component requires the username field to be present in order to convert the password field into a hash upon save. Apparently, even if I put this in the beforeFilter() - "$this->Auth->fields = array('username' => 'email', 'password' => 'password');" - it doesn't encrypt the password before inserting it into the database. So my question is, assuming this is supposed to happen, what is the best way to encrypt the password? Or, have I made a simple error somewhere?
Thanks in advance for any assistance!
Here's the before filter in the users_controller.php:
function beforeFilter() {
$this->Auth->fields = array('username' => 'email', 'password' => 'password');
}
And the app_controller.php:
var $components = array('Auth');