src/models/RemoteUser.php
public function isTrustedEmail($email)
    {
        static $trustedEmails = [
            '@gmail.com'    => 'Google',
            '@yandex.ru'    => 'Yandex',
        ];
        foreach ($trustedEmails as $domain => $trusted) {
            if ($this->provider === static::toProvider($trusted) && substr($email, -strlen($domain)) === $domain) {
                return true;
            }
        }

        return false;
    }
public function isTrustedEmail($email)
    {
        static $trustedEmails = [
            '@gmail.com'    => 'Google',
            '@yandex.ru'    => 'Yandex',
        ];
        foreach ($trustedEmails as $domain => $trusted) {
            if ($this->provider === static::toProvider($trusted) && substr($email, -strlen($domain)) === $domain) {
                return true;
            }
        }

        return false;
    }
public function isTrustedEmail ( $ email ) { static $ trustedEmails = [ '@gmail.com' => 'Google' , '@yandex.ru' => 'Yandex' , ] ; foreach ( $ trustedEmails as $ domain => $ trusted ) { if ( $ this -> provider === static :: toProvider ( $ trusted ) && substr ( $ email , - strlen ( $ domain ) ) === $ domain ) { return true ; } } return false ; }
Returns if given email is provided with appropriate service so it can be trusted.
@param string email address
@return bool is trusted
Returns if given email is provided with appropriate service so it can be trusted .