onokazu
onoka****@users*****
2005年 6月 30日 (木) 01:40:24 JST
Index: xoops2jp/html/kernel/member.php diff -u xoops2jp/html/kernel/member.php:1.2.10.3 xoops2jp/html/kernel/member.php:1.2.10.4 --- xoops2jp/html/kernel/member.php:1.2.10.3 Tue Jun 28 20:11:19 2005 +++ xoops2jp/html/kernel/member.php Thu Jun 30 01:40:24 2005 @@ -1,5 +1,5 @@ <?php -// $Id: member.php,v 1.2.10.3 2005/06/28 11:11:19 minahito Exp $ +// $Id: member.php,v 1.2.10.4 2005/06/29 16:40:24 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -30,13 +30,13 @@ // ------------------------------------------------------------------------- // if (!defined('XOOPS_ROOT_PATH')) { - exit(); + exit(); } require_once XOOPS_ROOT_PATH.'/kernel/user.php'; require_once XOOPS_ROOT_PATH.'/kernel/group.php'; /** -* XOOPS member handler class. +* XOOPS member handler class. * This class provides simple interface (a facade class) for handling groups/users/ * membership data. * @@ -72,7 +72,7 @@ /** * constructor - * + * */ function XoopsMemberHandler(&$db) { @@ -83,7 +83,7 @@ /** * create a new group - * + * * @return object XoopsGroup reference to the new group */ function &createGroup() @@ -93,7 +93,7 @@ /** * create a new user - * + * * @return object XoopsUser reference to the new user */ function &createUser() @@ -103,7 +103,7 @@ /** * retrieve a group - * + * * @param int $id ID for the group * @return object XoopsGroup reference to the group */ @@ -114,7 +114,7 @@ /** * retrieve a user - * + * * @param int $id ID for the user * @return object XoopsUser reference to the user */ @@ -128,33 +128,33 @@ /** * delete a group - * + * * @param object $group reference to the group to delete * @return bool FALSE if failed */ function deleteGroup(&$group) { $this->_gHandler->delete($group); - $this->_mHandler->deleteAll(new Criteria('groupid', $group->getVar('groupid'))); - return true; + $this->_mHandler->deleteAll(new Criteria('groupid', $group->getVar('groupid'))); + return true; } /** * delete a user - * + * * @param object $user reference to the user to delete * @return bool FALSE if failed */ function deleteUser(&$user) { $this->_uHandler->delete($user); - $this->_mHandler->deleteAll(new Criteria('uid', $user->getVar('uid'))); - return true; + $this->_mHandler->deleteAll(new Criteria('uid', $user->getVar('uid'))); + return true; } /** * insert a group into the database - * + * * @param object $group reference to the group to insert * @return bool TRUE if already in database and unchanged * FALSE on failure @@ -166,7 +166,7 @@ /** * insert a user into the database - * + * * @param object $user reference to the user to insert * @return bool TRUE if already in database and unchanged * FALSE on failure @@ -178,10 +178,10 @@ /** * retrieve groups from the database - * + * * @param object $criteria {@link CriteriaElement} * @param bool $id_as_key use the group's ID as key for the array? - * @return array array of {@link XoopsGroup} objects + * @return array array of {@link XoopsGroup} objects */ function getGroups($criteria = null, $id_as_key = false) { @@ -190,8 +190,8 @@ /** * retrieve users from the database - * - * @param object $criteria {@link CriteriaElement} + * + * @param object $criteria {@link CriteriaElement} * @param bool $id_as_key use the group's ID as key for the array? * @return array array of {@link XoopsUser} objects */ @@ -202,7 +202,7 @@ /** * get a list of groupnames and their IDs - * + * * @param object $criteria {@link CriteriaElement} object * @return array associative array of group-IDs and names */ @@ -218,7 +218,7 @@ /** * get a list of usernames and their IDs - * + * * @param object $criteria {@link CriteriaElement} object * @return array associative array of user-IDs and names */ @@ -234,7 +234,7 @@ /** * add a user to a group - * + * * @param int $group_id ID of the group * @param int $user_id ID of the user * @return object XoopsMembership @@ -249,7 +249,7 @@ /** * remove a list of users from a group - * + * * @param int $group_id ID of the group * @param array $user_ids array of user-IDs * @return bool success? @@ -268,7 +268,7 @@ /** * get a list of users belonging to a group - * + * * @param int $group_id ID of the group * @param bool $asobject return the users as objects? * @param int $limit number of users to return @@ -285,10 +285,10 @@ $ret = array(); foreach ($user_ids as $u_id) { $user =& $this->getUser($u_id); - if (is_object($user)) { - $ret[] =& $user; - } - unset($user); + if (is_object($user)) { + $ret[] =& $user; + } + unset($user); } return $ret; } @@ -296,7 +296,7 @@ /** * get a list of groups that a user is member of - * + * * @param int $user_id ID of the user * @param bool $asobject return groups as {@link XoopsGroup} objects or arrays? * @return array array of objects or arrays @@ -316,10 +316,10 @@ /** * log in a user - * + * * @param string $uname username as entered in the login form * @param string $pwd password entered in the login form - * @return object XoopsUser reference to the logged in user. FALSE if failed to log in + * @return object XoopsUser reference to the logged in user. FALSE if failed to log in */ function &loginUser($uname, $pwd) { @@ -334,10 +334,10 @@ /** * logs in a user with an nd5 encrypted password - * + * * @param string $uname username * @param string $md5pwd password encrypted with md5 - * @return object XoopsUser reference to the logged in user. FALSE if failed to log in + * @return object XoopsUser reference to the logged in user. FALSE if failed to log in */ function &loginUserMd5($uname, $md5pwd) { @@ -352,7 +352,7 @@ /** * count users matching certain conditions - * + * * @param object $criteria {@link CriteriaElement} object * @return int */ @@ -363,7 +363,7 @@ /** * count users belonging to a group - * + * * @param int $group_id ID of the group * @return int */ @@ -374,7 +374,7 @@ /** * updates a single field in a users record - * + * * @param object $user reference to the {@link XoopsUser} object * @param string $fieldName name of the field to update * @param string $fieldValue updated value for the field @@ -388,7 +388,7 @@ /** * updates a single field in a users record - * + * * @param string $fieldName name of the field to update * @param string $fieldValue updated value for the field * @param object $criteria {@link CriteriaElement} object @@ -401,7 +401,7 @@ /** * activate a user - * + * * @param object $user reference to the {@link XoopsUser} object * @return bool successful? */