protected FormBuilder::currentUser()
Gets the current active user.
Return value
\Drupal\Core\Session\AccountInterface
File
- core/lib/Drupal/Core/Form/FormBuilder.php, line 1385
Class
- FormBuilder
- Provides form building and processing.
Namespace
Drupal\Core\Form
Code
1 2 3 4 5 6 | protected function currentUser() { if (! $this ->currentUser && \Drupal::hasService( 'current_user' )) { $this ->currentUser = \Drupal::currentUser(); } return $this ->currentUser; } |
Please login to continue.