diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-04-15 07:18:19 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-04-15 07:18:19 +0000 |
commit | 8c1d1a9d0df5e1501d8beccbadeaf93c95313a62 (patch) | |
tree | 8d8b9b440363205c07d6245696fc301f5047c2ca /modules | |
parent | 03960546beba4c4022a8a8facb71889b48a2307b (diff) |
Provate a way to set the hashed password directly
Diffstat (limited to 'modules')
-rw-r--r-- | modules/user/models/user.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/user/models/user.php b/modules/user/models/user.php index a2715e00..7299a36b 100644 --- a/modules/user/models/user.php +++ b/modules/user/models/user.php @@ -29,9 +29,13 @@ class User_Model extends ORM { public function __set($column, $value) { switch ($column) { - case "password": - $value = user::hash_password($value); - break; + case "hashed_password": + $column = "password"; + break; + + case "password": + $value = user::hash_password($value); + break; } parent::__set($column, $value); } |