You are here

public function PremiumContent::getCurrentUser in Node Option Premium 8

Retrieves the current user.

Return value

\Drupal\Core\Session\AccountProxyInterface The current user.

1 call to PremiumContent::getCurrentUser()
PremiumContent::preprocessSearchQuery in src/Plugin/search_api/processor/PremiumContent.php
Preprocesses a search query.

File

src/Plugin/search_api/processor/PremiumContent.php, line 91

Class

PremiumContent
Adds premium information to the indexes.

Namespace

Drupal\nopremium\Plugin\search_api\processor

Code

public function getCurrentUser() {
  return $this->currentUser ?: \Drupal::currentUser();
}