summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-04-15 07:18:19 +0000
committerBharat Mediratta <bharat@menalto.com>2009-04-15 07:18:19 +0000
commit8c1d1a9d0df5e1501d8beccbadeaf93c95313a62 (patch)
tree8d8b9b440363205c07d6245696fc301f5047c2ca
parent03960546beba4c4022a8a8facb71889b48a2307b (diff)
Provate a way to set the hashed password directly
-rw-r--r--modules/user/models/user.php10
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);
}