diff --git a/core/modules/user/lib/Drupal/user/Plugin/Search/UserSearch.php b/core/modules/user/lib/Drupal/user/Plugin/Search/UserSearch.php index a08de51..ee1d590 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/Search/UserSearch.php +++ b/core/modules/user/lib/Drupal/user/Plugin/Search/UserSearch.php @@ -120,8 +120,8 @@ public function execute() { ->select('users') ->extend('Drupal\Core\Database\Query\PagerSelectExtender'); $query->fields('users', array('uid')); - $user = $this->currentUser(); - if ($user->hasPermission('administer users')) { + $user_account = $this->currentUser(); + if ($user_account->hasPermission('administer users')) { // Administrators can also search in the otherwise private email field, and // they don't need to be restricted to only active users. $query->fields('users', array('mail'));