function AccountProxyInterface::setInitialAccountId

Same name in other branches
  1. 9 core/lib/Drupal/Core/Session/AccountProxyInterface.php \Drupal\Core\Session\AccountProxyInterface::setInitialAccountId()
  2. 10 core/lib/Drupal/Core/Session/AccountProxyInterface.php \Drupal\Core\Session\AccountProxyInterface::setInitialAccountId()
  3. 11.x core/lib/Drupal/Core/Session/AccountProxyInterface.php \Drupal\Core\Session\AccountProxyInterface::setInitialAccountId()

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.

Parameters

int $account_id: The id of the initial account.

1 method overrides AccountProxyInterface::setInitialAccountId()
AccountProxy::setInitialAccountId in core/lib/Drupal/Core/Session/AccountProxy.php
Sets the id of the initial account.

File

core/lib/Drupal/Core/Session/AccountProxyInterface.php, line 49

Class

AccountProxyInterface
Defines an interface for a service which has the current account stored.

Namespace

Drupal\Core\Session

Code

public function setInitialAccountId($account_id);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.