diff --git a/core/lib/Drupal/Core/Plugin/PluginBase.php b/core/lib/Drupal/Core/Plugin/PluginBase.php index b957185..33c515a 100644 --- a/core/lib/Drupal/Core/Plugin/PluginBase.php +++ b/core/lib/Drupal/Core/Plugin/PluginBase.php @@ -35,7 +35,7 @@ * * @return \Drupal\Core\Session\AccountInterface */ - public function currentUser() { + protected function currentUser() { if (!$this->currentUser) { $this->currentUser = \Drupal::currentUser(); } @@ -43,20 +43,6 @@ public function currentUser() { } /** - * Sets the current active user. - * - * @param \Drupal\Core\Session\AccountInterface $user - * The current user. - * - * @return self - * The plugin object. - */ - public function setCurrentUser(AccountInterface $user) { - $this->currentUser = $user; - return $this; - } - - /** * Translates a string to the current language or to a given language. * * See the t() documentation for details.