if ($result != NULL) { show_vars($result); } } else { $result = $config->get($var); show_var($var, $result); } } else { if ($action == "admin") { if ($var == NULL) { $result = $users->getAllAdmins(); foreach ($result as $user) { show_user($user); } } else { $user = $users->getByLogin($var); if ($user != NULL) { Audit::log('console', 'set user admin ' . $user->login . '(' . $user->id . ')'); $users->setAdmin($user->id, 1); } else { dbg('Login not found'); exit(1); } } } else { if ($action == "user") { if ($var == NULL) { $result = User::instance()->get(); foreach ($result as $user) { show_user($user); }