Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Eric Rasmussen
UNL-CMS
Commits
0ae9f843
Commit
0ae9f843
authored
May 15, 2013
by
Tim Steiner
Browse files
[gh-719] Hide the default "admin" user even if it belongs to roles. @1h00
parent
07494805
Changes
1
Hide whitespace changes
Inline
Side-by-side
sites/all/modules/unl/unl.module
View file @
0ae9f843
...
...
@@ -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'
);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment