diff options
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/group.php | 25 | ||||
-rw-r--r-- | modules/gallery/helpers/user.php | 40 |
2 files changed, 17 insertions, 48 deletions
diff --git a/modules/gallery/helpers/group.php b/modules/gallery/helpers/group.php index 17dd7f70..b87ed248 100644 --- a/modules/gallery/helpers/group.php +++ b/modules/gallery/helpers/group.php @@ -58,28 +58,21 @@ class group_Core { } /** - * Create a new group. - * - * @param string $name - * @return Group_Core + * @see Identity_Driver::create. */ static function create($name) { return Identity::instance()->create_group($name); } /** - * The group of all possible visitors. This includes the guest user. - * - * @return Group_Core + * @see Identity_Driver::everbody. */ static function everybody() { return Identity::instance()->everybody(); } /** - * The group of all logged-in visitors. This does not include guest users. - * - * @return Group_Core + * @see Identity_Driver::registered_users. */ static function registered_users() { return Identity::instance()->everybody(); @@ -88,7 +81,7 @@ class group_Core { /** * Look up a group by id. * @param integer $id the user id - * @return Group_Model the group object, or null if the id was invalid. + * @return Group_Definition the group object, or null if the id was invalid. */ static function lookup($id) { return Identity::instance()->lookup_group_by_field("id", $id); @@ -97,25 +90,21 @@ class group_Core { /** * Look up a group by name. * @param integer $id the group name - * @return Group_Core the group object, or null if the name was invalid. + * @return Group_Definition the group object, or null if the name was invalid. */ static function lookup_by_name($name) { return Identity::instance()->lookup_group_by_field("name", $name); } /** - * List the groups - * @param mixed options to apply to the selection of the user (@see Database.php) - * @return array the group list. + * @see Identity_Driver::get_group_list. */ static function get_group_list($filter=array()) { return Identity::instance()->get_group_list($filter); } /** - * Return the edit rules associated with an group. - * - * @return stdClass containing the rules + * @see Identity_Driver::get_edit_rules. */ static function get_edit_rules() { return Identity::instance()->get_edit_rules("group"); diff --git a/modules/gallery/helpers/user.php b/modules/gallery/helpers/user.php index 84a29efc..f09e963e 100644 --- a/modules/gallery/helpers/user.php +++ b/modules/gallery/helpers/user.php @@ -246,43 +246,28 @@ class user_Core { } /** - * Return the guest user. - * - * @todo consider caching - * - * @return User_Model + * @see Identity_Driver::guest. */ - static function guest() { +static function guest() { return Identity::instance()->guest(); } /** - * Create a new user. - * - * @param string $name - * @param string $full_name - * @param string $password - * @return User_Model + * @see Identity_Driver::create_user. */ static function create($name, $full_name, $password) { return Identity::instance()->create_user($name, $full_name, $password); } /** - * Is the password provided correct? - * - * @param user User Model - * @param string $password a plaintext password - * @return boolean true if the password is correct + * @see Identity_Driver::is_correct_password. */ static function is_correct_password($user, $password) { return Identity::instance()->is_correct_password($user, $password); } /** - * Create the hashed passwords. - * @param string $password a plaintext password - * @return string hashed password + * @see Identity_Driver::hash_password. */ static function hash_password($password) { return Identity::instance()->hash_password($password); @@ -291,7 +276,7 @@ class user_Core { /** * Look up a user by id. * @param integer $id the user id - * @return User_Model the user object, or null if the id was invalid. + * @return User_Definition the user object, or null if the id was invalid. */ static function lookup($id) { return Identity::instance()->lookup_user_by_field("id", $id); @@ -300,35 +285,30 @@ class user_Core { /** * Look up a user by name. * @param integer $name the user name - * @return User_Model the user object, or null if the name was invalid. + * @return User_Definition the user object, or null if the name was invalid. */ static function lookup_by_name($name) { return Identity::instance()->lookup_user_by_field("name", $name); } - /** * Look up a user by hash. * @param string $name the user name - * @return User_Model the user object, or null if the name was invalid. + * @return User_Definition the user object, or null if the name was invalid. */ static function lookup_by_hash($hash) { return Identity::instance()->lookup_user_by_field("hash", $hash); } /** - * List the users - * @param mixed options to apply to the selection of the user(optional) - * @return array the group list. + * @see Identity_Driver::get_user_list. */ static function get_user_list($filter=array()) { return Identity::instance()->get_user_list($filter); } /** - * Return the edit rules associated with an user. - * - * @return stdClass containing the rules + * @see Identity_Driver::get_edit_rules. */ static function get_edit_rules() { return Identity::instance()->get_edit_rules("user"); |