diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-19 12:53:44 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-19 12:53:44 -0700 |
commit | 098b57bf18112d0a3173dbe28b5ed76782431ff7 (patch) | |
tree | 597410ea09aa91de7ac3dde2a5cc7b182c2aa35b /modules/user/helpers | |
parent | 1b530e4680b09391d7f99e91f1b0b1eb6b2069fc (diff) |
Simplify the user interface by moving the password reset functionality into the user module
Bagging the User_Definition and Group_Definition abstract classes and replacing them with interfaces with the same names.
Make sure all the unit tests work.
Diffstat (limited to 'modules/user/helpers')
-rw-r--r-- | modules/user/helpers/group.php | 4 | ||||
-rw-r--r-- | modules/user/helpers/user.php | 15 |
2 files changed, 14 insertions, 5 deletions
diff --git a/modules/user/helpers/group.php b/modules/user/helpers/group.php index cf5c050f..8ad52564 100644 --- a/modules/user/helpers/group.php +++ b/modules/user/helpers/group.php @@ -42,14 +42,14 @@ class group_Core { * @see Identity_Driver::everbody. */ static function everybody() { - return Identity::instance()->everybody(); + return model_cache::get("group", 1); } /** * @see Identity_Driver::registered_users. */ static function registered_users() { - return Identity::instance()->everybody(); + return model_cache::get("group", 2); } /** diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php index fa7b320f..5ef2b726 100644 --- a/modules/user/helpers/user.php +++ b/modules/user/helpers/user.php @@ -25,14 +25,21 @@ */ class user_Core { /** - * @see Identity_Driver::guest. + * Return the guest user. + * + * @return User_Model the user object */ static function guest() { return model_cache::get("user", 1); } /** - * @see Identity_Driver::create_user. + * Create a new user. + * + * @param string $name + * @param string $full_name + * @param string $password + * @return User_Definition the user object */ static function create($name, $full_name, $password) { $user = ORM::factory("user")->where("name", $name)->find(); @@ -53,7 +60,9 @@ class user_Core { } /** - * @see Identity_Driver::hash_password. + * Hash the password to the internal value + * @param string $password the user password + * @param string The hashed equivalent */ static function hash_password($password) { require_once(MODPATH . "user/lib/PasswordHash.php"); |