mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-11 04:49:08 -04:00
Correct some missing properties and change the user_model to have a set function so the password is hashed as part of the model
This commit is contained in:
@@ -19,4 +19,13 @@
|
||||
*/
|
||||
class User_Model extends ORM {
|
||||
protected $has_and_belongs_to_many = array('groups');
|
||||
|
||||
public function __set($column, $value) {
|
||||
switch ($column) {
|
||||
case "password":
|
||||
$value = user_password::hash_password($value);
|
||||
break;
|
||||
}
|
||||
parent::__set($column, $value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user