You are here

public function AuthenticationManager::setAccount in RESTful 7.2

Setter method for the account property.

Parameters

object $account: The account to set.

Overrides AuthenticationManagerInterface::setAccount

1 call to AuthenticationManager::setAccount()
AuthenticationManager::getAccount in src/Authentication/AuthenticationManager.php
Get the user account for the request.

File

src/Authentication/AuthenticationManager.php, line 157
Contains \Drupal\restful\Authentication\AuthenticationManager

Class

AuthenticationManager
Class AuthenticationManager.

Namespace

Drupal\restful\Authentication

Code

public function setAccount($account) {
  $this->account = $account;
  if (!empty($account->uid)) {
    $this->userSessionState
      ->switchUser($account);
  }
}