public function RoleAccess::getCurrentUser in Search API 8
Retrieves the current user.
Return value
\Drupal\Core\Session\AccountProxyInterface The current user.
1 call to RoleAccess::getCurrentUser()
- RoleAccess::preprocessSearchQuery in src/
Plugin/ search_api/ processor/ RoleAccess.php - Preprocesses a search query.
File
- src/
Plugin/ search_api/ processor/ RoleAccess.php, line 82
Class
- RoleAccess
- Adds access checks based on user roles.
Namespace
Drupal\search_api\Plugin\search_api\processorCode
public function getCurrentUser() {
return $this->currentUser ?: \Drupal::currentUser();
}