src/Kunstmaan/AdminBundle/Helper/Security/OAuth/OAuthUserCreator.php
private function getAccessLevels($email)
    {
        foreach ($this->hostedDomains as $hostedDomain) {
            if (preg_match('/'.$hostedDomain['domain_name'].'$/', $email)) {
                return $hostedDomain['access_levels'];
            }
        }

        return null;
    }
private function getAccessLevels($email)
    {
        foreach ($this->hostedDomains as $hostedDomain) {
            if (preg_match('/'.$hostedDomain['domain_name'].'$/', $email)) {
                return $hostedDomain['access_levels'];
            }
        }

        return null;
    }
private function getAccessLevels ( $ email ) { foreach ( $ this -> hostedDomains as $ hostedDomain ) { if ( preg_match ( '/' . $ hostedDomain [ 'domain_name' ] . '$/' , $ email ) ) { return $ hostedDomain [ 'access_levels' ] ; } } return null ; }
This method returns the access level coupled with the domain of the given email
If the given domain name has not been configured this function will return null

@param string $email

@return string[]|null
This method returns the access level coupled with the domain of the given email If the given domain name has not been configured this function will return null