예제 #1
0
 static function AdminGroups()
 {
     if (FSS_Permission::auth("fss.groups", "com_fss.groups")) {
         return true;
     }
     // otherwise we need to build a list of group ids that we are manager for
     $user = JFactory::getUser();
     $userid = $user->id;
     $qry = "SELECT group_id FROM #__fss_ticket_group_members WHERE user_id = '{$userid}' AND isadmin = 1";
     $db = JFactory::getDBO();
     $db->setQuery($qry);
     self::$group_id_access = $db->loadObjectList('group_id');
     if (count(self::$group_id_access) < 1) {
         return false;
     }
     foreach (self::$group_id_access as $id => &$temp) {
         self::$group_id_access[$id] = $id;
     }
     return true;
 }