Neos\Flow\Security\Context::getAccountByAuthenticationProviderName PHP Method

getAccountByAuthenticationProviderName() public method

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
return 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;
    }