Features LDAP, Rights, Cables, Menu improvements and bug fixing

This commit is contained in:
2023-02-28 19:21:42 +01:00
parent 26e9c89405
commit db26ffa611
59 changed files with 1039 additions and 301 deletions

View File

@@ -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");