Neos\Flow\Security\Context::getAccountByAuthenticationProviderName PHP Méthode

getAccountByAuthenticationProviderName() public méthode

Returns an authenticated account for the given provider or NULL if no account was authenticated or no token was registered for the given authentication provider name.
public getAccountByAuthenticationProviderName ( string $authenticationProviderName ) : Account
$authenticationProviderName string Authentication provider name of the account to find
Résultat Account The authenticated account
    public function getAccountByAuthenticationProviderName($authenticationProviderName)
    {
        if ($this->initialized === false) {
            $this->initialize();
        }
        if (isset($this->activeTokens[$authenticationProviderName]) && $this->activeTokens[$authenticationProviderName]->isAuthenticated() === true) {
            return $this->activeTokens[$authenticationProviderName]->getAccount();
        }
        return null;
    }