Commit cc06a92a authored by alexpott's avatar alexpott

Issue #2378329 by almaudoh: Update AccountProxyInterface::setAccount()...

Issue #2378329 by almaudoh: Update AccountProxyInterface::setAccount() documentation to point people to the account_switcher service
parent 49b1c1d7
......@@ -18,7 +18,11 @@ 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
* 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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment