You are here

protected function WebformSubmissionLimitBlock::getCurrentUser in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/Block/WebformSubmissionLimitBlock.php \Drupal\webform\Plugin\Block\WebformSubmissionLimitBlock::getCurrentUser()

Get the current user account.

Return value

\Drupal\Core\Session\AccountInterface|null The current user account or NULL if the user limit is not being displayed.

1 call to WebformSubmissionLimitBlock::getCurrentUser()
WebformSubmissionLimitBlock::getTotal in src/Plugin/Block/WebformSubmissionLimitBlock.php
Get total number of submissions for selected limit type.

File

src/Plugin/Block/WebformSubmissionLimitBlock.php, line 473

Class

WebformSubmissionLimitBlock
Provides a 'Webform submission limit' block.

Namespace

Drupal\webform\Plugin\Block

Code

protected function getCurrentUser() {
  return $this->configuration['type'] === 'user' ? $this->currentUser : NULL;
}