Commit 0ae9f843 authored by Tim Steiner's avatar Tim Steiner
Browse files

[gh-719] Hide the default "admin" user even if it belongs to roles. @1h00

parent 07494805
......@@ -1033,7 +1033,10 @@ function unl_query_alter(QueryAlterableInterface $query) {
// 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');
if (!unl_user_is_administrator()) {
// Hide users that are only in the administrator role
$query->where('unl_distinct_prefix_r.rid != ' . unl_shared_variable_get('user_admin_role', -1));
// Hide the default admin user.
$query->where($usersTableAlias . '.uid != 1');
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment