diff options
author | Simon Rettberg | 2018-02-20 15:20:26 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-02-20 15:20:26 +0100 |
commit | 7dc7a49e3704b52c4a40909050bf831826b3c41b (patch) | |
tree | 994ee137b0c11acfab798793b53dd953b81cdc91 /modules-available/permissionmanager/inc/getpermissiondata.inc.php | |
parent | [permissionmanager] Fix location table display (diff) | |
download | slx-admin-7dc7a49e3704b52c4a40909050bf831826b3c41b.tar.gz slx-admin-7dc7a49e3704b52c4a40909050bf831826b3c41b.tar.xz slx-admin-7dc7a49e3704b52c4a40909050bf831826b3c41b.zip |
[permissionmanager] Ensure uniqueness in role_x_location table, consistent table naming, drop unused id field
Diffstat (limited to 'modules-available/permissionmanager/inc/getpermissiondata.inc.php')
-rw-r--r-- | modules-available/permissionmanager/inc/getpermissiondata.inc.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules-available/permissionmanager/inc/getpermissiondata.inc.php b/modules-available/permissionmanager/inc/getpermissiondata.inc.php index 496c8224..fc18de99 100644 --- a/modules-available/permissionmanager/inc/getpermissiondata.inc.php +++ b/modules-available/permissionmanager/inc/getpermissiondata.inc.php @@ -15,8 +15,8 @@ class GetPermissionData { $res = Database::simpleQuery("SELECT user.userid AS userid, user.login AS login, role.rolename AS rolename, role.roleid AS roleid FROM user - LEFT JOIN user_x_role ON user.userid = user_x_role.userid - LEFT JOIN role ON user_x_role.roleid = role.roleid + LEFT JOIN role_x_user ON user.userid = role_x_user.userid + LEFT JOIN role ON role_x_user.roleid = role.roleid "); $userdata = array(); while ($row = $res->fetch(PDO::FETCH_ASSOC)) { @@ -75,7 +75,7 @@ class GetPermissionData $cols = $joins = ''; if ($flags & self::WITH_USER_COUNT) { $cols .= ', Count(DISTINCT rxu.userid) AS users'; - $joins .= ' LEFT JOIN user_x_role rxu ON (r.roleid = rxu.roleid)'; + $joins .= ' LEFT JOIN role_x_user rxu ON (r.roleid = rxu.roleid)'; } if ($flags & self::WITH_LOCATION_COUNT) { $cols .= ', Count(DISTINCT rxl.locationid) AS locations'; |