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:
Tim Almdal
2008-11-11 20:02:43 +00:00
parent a15c7cb11f
commit f5d092b484
3 changed files with 39 additions and 2 deletions

View File

@@ -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);
}
}