Fixing bug where password would not be hashed in database if user updated password

This affected admin and user interfaces
This commit is contained in:
Nathan Adams 2014-08-21 21:58:41 -05:00
parent 83267c5807
commit 1944b5acc0
2 changed files with 2 additions and 0 deletions

View File

@ -315,6 +315,7 @@ class IDF_Form_Admin_UserUpdate extends Pluf_Form
if ($password1 != $password2) {
throw new Pluf_Form_Invalid(__('The passwords do not match. Please give them again.'));
}
$this->cleaned_data["password"] = base64_encode(sha1($this->cleaned_data['password'], true));
}
return $this->cleaned_data;
}

View File

@ -479,6 +479,7 @@ class IDF_Form_UserAccount extends Pluf_Form
if ($password1 != $password2) {
throw new Pluf_Form_Invalid(__('The passwords do not match. Please give them again.'));
}
$this->cleaned_data["password"] = base64_encode(sha1($this->cleaned_data['password'], true));
}
return $this->cleaned_data;