You are here

public function CasUserManager::setCasUsernameForAccount in CAS 8

Same name and namespace in other branches
  1. 2.x src/Service/CasUserManager.php \Drupal\cas\Service\CasUserManager::setCasUsernameForAccount()

Save an association of the passed in Drupal user account and CAS username.

Parameters

\Drupal\user\UserInterface $account: The user account entity.

string $cas_username: The CAS username.

File

src/Service/CasUserManager.php, line 303

Class

CasUserManager
Class CasUserManager.

Namespace

Drupal\cas\Service

Code

public function setCasUsernameForAccount(UserInterface $account, $cas_username) {
  $this->authmap
    ->save($account, $this->provider, $cas_username);
}