Commit e630ed07 authored by Tim Steiner's avatar Tim Steiner
Browse files

[gh-447] Merge branch 'issue-447' into develop

parents f2931e82 b5fbd8ed
......@@ -1520,8 +1520,14 @@ function unl_query_alter(QueryAlterableInterface $query) {
}
// If we actually find a users table
if ($usersTableAlias) {
// Get rid of pagination.
// @TODO: Even though users w/o role are not returned, pagination for them does. Fix this rather than using limit.
$query->limit(10000);
// 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()) {
$query->where('unl_distinct_prefix_r.rid != ' . unl_shared_variable_get('user_admin_role', -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