diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2008-11-11 20:02:43 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2008-11-11 20:02:43 +0000 |
commit | f5d092b4848e07c2fff453b7723266e8aab4463c (patch) | |
tree | 496d6ceb4f0799e5c0a5725f01aa86a500430c53 /modules/user/models | |
parent | a15c7cb11fbf3a45492cf7cb0a04823d4321f3d5 (diff) |
Correct some missing properties and change the user_model to have a set function so the password is hashed as part of the model
Diffstat (limited to 'modules/user/models')
-rw-r--r-- | modules/user/models/user.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/user/models/user.php b/modules/user/models/user.php index 8b48b7e5..d02d0ae0 100644 --- a/modules/user/models/user.php +++ b/modules/user/models/user.php @@ -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); + } }
\ No newline at end of file |