khanat-opennel-code/code/ryzom/tools/server/ryzom_ams/www/html/inc/userlist.php
Quitta 50f32e5e1c Outputted time is handled by using the Helpers::outputTime function, this makes changees to the time format easy.
Also made it possible for admins to edit roles directly in the userlist.
2013-07-19 16:30:58 +02:00

25 lines
No EOL
870 B
PHP

<?php
function userlist(){
if(Ticket_User::isMod($_SESSION['ticket_user'])){
$users = WebUsers::getUsers();
$i = 0;
$pageResult['userlist'] = Array();
while($row = $users->fetch(PDO::FETCH_ASSOC)){
$pageResult['userlist'][$i]['id'] = $row['UId'];
$pageResult['userlist'][$i]['username'] = $row['Login'];
$pageResult['userlist'][$i]['permission'] = Ticket_User::constr_ExternId($row['UId'])->getPermission();
$pageResult['userlist'][$i]['email'] = $row['Email'];
$i++;
}
if (Ticket_User::isAdmin($_SESSION['ticket_user'])){
$pageResult['isAdmin'] = "TRUE";
}
return $pageResult;
}else{
//ERROR: No access!
$_SESSION['error_code'] = "403";
header("Location: index.php?page=error");
exit;
}
}