Beispiel #1
0
 /**
  * @param string $string
  */
 public static function get_groups_in_option($string)
 {
     $string = $string . "*";
     $user_array = User_Wrapper::list_search_groups($string, null, null, null, null);
     if (is_array($user_array) and $user_array >= 1) {
         $return = "";
         foreach ($user_array as $key => $value) {
             $return .= "<option id='Group" . $value['id'] . "'>" . $value['name'] . "</option>";
         }
         return $return;
     } else {
         return "<option></option>";
     }
 }
Beispiel #2
0
 /**
  * @param string $json_argument_array
  * @return integer
  * @throws BaseUserAccessDeniedException
  */
 public static function count_users($json_argument_array)
 {
     global $user;
     if ($user->is_admin()) {
         return User_Wrapper::count_users();
     } else {
         throw new BaseUserAccessDeniedException();
     }
 }
Beispiel #3
0
 /**
  * @param string $json_argument_array
  * @return integer
  * @throws BaseAjaxArgumentMissingException
  */
 public static function count_groups($json_argument_array)
 {
     $argument_array = json_decode($json_argument_array);
     if (is_array($argument_array)) {
         $string = $argument_array[1];
         return User_Wrapper::count_search_groups($string);
     } else {
         throw new BaseAjaxArgumentMissingException();
     }
 }