コード例 #1
0
 /**
  * Is the given user id in the given group?
  *
  * @param int $userId
  * @param int $groupId
  * @return array GalleryStatus a status code
  *               boolean true if yes
  */
 function isUserInGroup($userId, $groupId) {
 MyOOS_CoreApi::requireOnce(
     'modules/core/classes/helpers/GalleryUserGroupHelper_simple.class');
 return GalleryUserGroupHelper_simple::isUserInGroup($userId, $groupId);
 }
コード例 #2
0
 /**
  * Return a list of groups that a user belongs to.
  * You can specify how many userids to list, and where the windows is in the list of all users.
  *
  * @param int $userId
  * @param int $count the number of group ids desired
  * @param int $offset the start of the range
  * @return array GalleryStatus a status code
  *               array group id => group name
  */
 function fetchGroupsForUser($userId, $count = null, $offset = null)
 {
     MyOOS_CoreApi::requireOnce('modules/core/classes/helpers/GalleryUserGroupHelper_simple.class');
     return GalleryUserGroupHelper_simple::fetchGroupsForUser($userId, $count, $offset);
 }