Minahito
minah****@users*****
2006年 9月 25日 (月) 18:40:06 JST
Index: xoops2jp/html/modules/user/admin/forms/UserSearchForm.class.php diff -u xoops2jp/html/modules/user/admin/forms/UserSearchForm.class.php:1.1.2.4 xoops2jp/html/modules/user/admin/forms/UserSearchForm.class.php:1.1.2.5 --- xoops2jp/html/modules/user/admin/forms/UserSearchForm.class.php:1.1.2.4 Fri Aug 18 18:05:54 2006 +++ xoops2jp/html/modules/user/admin/forms/UserSearchForm.class.php Mon Sep 25 18:40:05 2006 @@ -31,7 +31,8 @@ $this->mFormProperties['under_posts'] =& new XCube_IntProperty('under_posts'); $this->mFormProperties['mail_condition'] =& new XCube_IntProperty('mail_condition'); $this->mFormProperties['user_level'] =& new XCube_IntProperty('user_level'); - + $this->mFormProperties['groups'] =& new XCube_IntArrayProperty('groups'); + // // Set field properties // @@ -140,6 +141,21 @@ $this->mFieldProperties['user_level']->addVar('min', '1'); $this->mFieldProperties['user_level']->addVar('max', '3'); } + + /** + * FIXME: We may implement this member function as the objectExist + * validator. + */ + function validateGroups() + { + $groupHandler =& xoops_gethandler('group'); + foreach ($this->get('groups') as $gid) { + $group =& $groupHandler->get($gid); + if (!is_object($group)) { + $this->addErrorMessage(_AD_USER_ERROR_GROUP_VALUE); + } + } + } } ?>