diff --git a/themes/openstack_bootstrap/template.php b/themes/openstack_bootstrap/template.php index efbf876..98e5c57 100755 --- a/themes/openstack_bootstrap/template.php +++ b/themes/openstack_bootstrap/template.php @@ -234,6 +234,7 @@ function openstack_bootstrap_preprocess_views_view(&$variables) { * Implements template_preprocess_user_profile() */ function openstack_bootstrap_preprocess_user_profile(&$variables) { + global $user; $account = $variables['elements']['#account']; if (in_array('ambassador', $account->roles)) { $variables['user_profile']['role_ambassador'] = array( @@ -249,8 +250,9 @@ function openstack_bootstrap_preprocess_user_profile(&$variables) { '#suffix' => '', ); } - if ((in_array('community_manager', $account->roles)) || - (in_array('ambassador', $account->roles))) { + if (((in_array('community_manager', $user->roles)) || + (in_array('ambassador', $user->roles)) || + (in_array('administrator', $user->roles))) && ($user->uid == $account->uid)) { $pending_groups = db_select('node', 'n') ->fields('n') ->condition('n.status', 0, '=') @@ -267,6 +269,12 @@ function openstack_bootstrap_preprocess_user_profile(&$variables) { '#prefix' => '