Features LDAP, Rights, Cables, Menu improvements and bug fixing
This commit is contained in:
17
user.php
17
user.php
@@ -8,14 +8,27 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*****************************************************************************/
|
||||
|
||||
include("includes.php");
|
||||
|
||||
if (($_SESSION['suser_role_admin'] == 0) and ($_SESSION['suser_role_manage'] == 0)) {
|
||||
header_location('comments.php?comments=accessdenied');
|
||||
}
|
||||
|
||||
include("header.php");
|
||||
|
||||
$sql = "SELECT user_id AS id, user_name AS name,
|
||||
user_displayname AS displayname, user_realm as realm
|
||||
user_displayname AS displayname, user_realm AS realm,
|
||||
user_role AS role
|
||||
FROM user
|
||||
ORDER BY user_name";
|
||||
$sth = $dbh->query($sql);
|
||||
$smarty->assign("users", $sth->fetchAll(PDO::FETCH_ASSOC));
|
||||
|
||||
// role: convert db set to array
|
||||
$users = $sth->fetchAll(PDO::FETCH_ASSOC);
|
||||
for($i = 0; $i < count($users); $i++) {
|
||||
$users[$i]['role'] = explode(',', $users[$i]['role'] );
|
||||
}
|
||||
|
||||
$smarty->assign("users", $users);
|
||||
|
||||
$smarty->display("user.tpl");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user