Skip to content
Snippets Groups Projects
Commit fdb2b748 authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

[gh-447] Don't show global administrators on admin/people

parent 7b99b420
Branches issue-447
No related tags found
No related merge requests found
...@@ -1508,8 +1508,10 @@ function unl_query_alter(QueryAlterableInterface $query) { ...@@ -1508,8 +1508,10 @@ function unl_query_alter(QueryAlterableInterface $query) {
} }
// If we actually find a users table // If we actually find a users table
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 AND role is not admin.
$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'
.' AND unl_distinct_prefix_r.rid != '.unl_shared_variable_get('user_admin_role', 0));
} }
} }
} }
...@@ -1517,8 +1519,7 @@ function unl_query_alter(QueryAlterableInterface $query) { ...@@ -1517,8 +1519,7 @@ function unl_query_alter(QueryAlterableInterface $query) {
/** /**
* Implementation of hook_filter_info() * Implementation of hook_filter_info()
*/ */
function unl_filter_info() function unl_filter_info() {
{
return array( return array(
'unl_embed' => array( 'unl_embed' => array(
'title' => 'UNL Node Embed', 'title' => 'UNL Node Embed',
...@@ -1540,8 +1541,7 @@ function unl_filter_info() ...@@ -1540,8 +1541,7 @@ function unl_filter_info()
* *
* Replace any instances of [[node:X]] in the $text with the content of node X's body. * Replace any instances of [[node:X]] in the $text with the content of node X's body.
*/ */
function unl_filter_embed_process($text, $filter, $format, $langcode, $cache, $cache_id) function unl_filter_embed_process($text, $filter, $format, $langcode, $cache, $cache_id) {
{
static $processed_hashes = array(); static $processed_hashes = array();
$text_hash = hash('sha256', $text); $text_hash = hash('sha256', $text);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment