protected function GALoginHotpSetup::accountName in Google Authenticator login 8
Get account name for QR image.
Return value
string URL encoded string.
1 call to GALoginHotpSetup::accountName()
- GALoginHotpSetup::getQrCodeUri in src/
Plugin/ TfaSetup/ GALoginHotpSetup.php - Get a base64 qrcode image uri of seed.
File
- src/
Plugin/ TfaSetup/ GALoginHotpSetup.php, line 179
Class
- GALoginHotpSetup
- HOTP setup class to setup HOTP validation.
Namespace
Drupal\ga_login\Plugin\TfaSetupCode
protected function accountName() {
/** @var \Drupal\user\Entity\User $account */
$account = User::load($this->configuration['uid']);
$prefix = $this->siteNamePrefix ? preg_replace('@[^a-z0-9-]+@', '-', strtolower(\Drupal::config('system.site')
->get('name'))) : $this->namePrefix;
return urlencode($prefix . '-' . $account
->getAccountName());
}