public function index() { if (Auth::isAuth() && (Auth::isAdmin() || Auth::isGod())) { $users = UsersManagement::retrieveUsers(Auth::getCopName()); if (isset($_SESSION['isError'])) { $message = $_SESSION['message']; $isError = $_SESSION['isError']; unset($_SESSION['message']); unset($_SESSION['isError']); } $widgetManagement = true; $partial = 'users'; $i = 0; require_once DefaultFC::getView('admin.tpl'); } else { redirect('users/index'); } }
public static function retrieveUsers() { $usernames = array(); $users = UsersManagement::retrieveUsers('cop1'); foreach ($users as $user) { if ($user['is_anonymous'] != 1) { $usernames[] = $user['username']; } } sort($usernames); var_dump($usernames); }