Skip to content
Snippets Groups Projects
Commit 94312c5b authored by Tim Steiner's avatar Tim Steiner
Browse files

[gh-447] Hide administrators at admin/people from non-administrators unless...

[gh-447] Hide administrators at admin/people from non-administrators unless the adiministrator belongs to other roles.
parent fea612a3
No related branches found
No related tags found
No related merge requests found
...@@ -1510,6 +1510,9 @@ function unl_query_alter(QueryAlterableInterface $query) { ...@@ -1510,6 +1510,9 @@ function unl_query_alter(QueryAlterableInterface $query) {
if ($usersTableAlias) { if ($usersTableAlias) {
// Join it with the users_roles tables so that only users with roles are seleceted. // Join it with the users_roles tables so that only users with roles are seleceted.
$query->join('users_roles', 'unl_distinct_prefix_r', $usersTableAlias . '.uid = unl_distinct_prefix_r.uid'); $query->join('users_roles', 'unl_distinct_prefix_r', $usersTableAlias . '.uid = unl_distinct_prefix_r.uid');
if (unl_user_is_administrator()) {
$query->where('unl_distinct_prefix_r.rid != ' . unl_shared_variable_get('user_admin_role', -1));
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment