50f32e5e1c
Also made it possible for admins to edit roles directly in the userlist.
25 lines
No EOL
870 B
PHP
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;
|
|
}
|
|
} |