From f5d092b4848e07c2fff453b7723266e8aab4463c Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 11 Nov 2008 20:02:43 +0000 Subject: Correct some missing properties and change the user_model to have a set function so the password is hashed as part of the model --- modules/user/models/user.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'modules/user/models') 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 -- cgit v1.2.3