Exemple #1
0
 /**
  * Returns true if the given groups are accessible for the active user.
  * 
  * @param	array		$groupIDs
  * @return	boolean
  */
 public static function isAccessibleGroup(array $groupIDs = array())
 {
     if (self::$accessibleGroups === null) {
         self::$accessibleGroups = explode(',', WCF::getSession()->getPermission('admin.user.accessibleGroups'));
     }
     if (empty($groupIDs)) {
         return false;
     }
     foreach ($groupIDs as $groupID) {
         if (!in_array($groupID, self::$accessibleGroups)) {
             return false;
         }
     }
     return true;
 }