Mercurial > hg > isophonics-drupal-site
view core/lib/Drupal/Core/Session/AccountProxyInterface.php @ 13:5fb285c0d0e3
Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've
been lucky to get away with this so far, as we don't support self-registration
which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5
was vulnerable to.
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:33:26 +0100 |
parents | 4c8ae668cc8c |
children | 1fec387a4317 |
line wrap: on
line source
<?php namespace Drupal\Core\Session; /** * Defines an interface for a service which has the current account stored. * * @ingroup user_api */ interface AccountProxyInterface extends AccountInterface { /** * Sets the currently wrapped account. * * Setting the current account is highly discouraged! Instead, make sure to * inject the desired user object into the dependent code directly. * * A preferable method of account impersonation is to use * \Drupal\Core\Session\AccountSwitcherInterface::switchTo() and * \Drupal\Core\Session\AccountSwitcherInterface::switchBack(). * * @param \Drupal\Core\Session\AccountInterface $account * The current account. */ public function setAccount(AccountInterface $account); /** * Gets the currently wrapped account. * * @return \Drupal\Core\Session\AccountInterface * The current account. */ public function getAccount(); /** * Sets the id of the initial account. * * Never use this method, its sole purpose is to work around weird effects * during mid-request container rebuilds. * * @param int $account_id * The id of the initial account. */ public function setInitialAccountId($account_id); }