protected function retrieveUserByCredentials(array $credentials)
    {
        $class = $this->modelClass();

        $identifier = $class::getAuthIdentifierName();
        $password   = $class::getAuthPasswordName();

        $user = $this->retrieveUserByIdentifier(Arr::fetch($credentials, $identifier));

        if ($user) {
            /** @var \Phalcon\Security $security */
            $security = $this->{Services::SECURITY};

            if($security->checkHash(Arr::fetch($credentials, $password), $user->getAuthPassword())){
                return $user;
            }
        }

        return null;
    }
protected function retrieveUserByCredentials(array $credentials)
    {
        $class = $this->modelClass();

        $identifier = $class::getAuthIdentifierName();
        $password   = $class::getAuthPasswordName();

        $user = $this->retrieveUserByIdentifier(Arr::fetch($credentials, $identifier));

        if ($user) {
            /** @var \Phalcon\Security $security */
            $security = $this->{Services::SECURITY};

            if($security->checkHash(Arr::fetch($credentials, $password), $user->getAuthPassword())){
                return $user;
            }
        }

        return null;
    }
protected function retrieveUserByCredentials ( array $ credentials ) { $ class = $ this -> modelClass ( ) ; $ identifier = $ class :: getAuthIdentifierName ( ) ; $ password = $ class :: getAuthPasswordName ( ) ; $ user = $ this -> retrieveUserByIdentifier ( Arr :: fetch ( $ credentials , $ identifier ) ) ; if ( $ user ) { /** @var \Phalcon\Security $security */ $ security = $ this -> { Services :: SECURITY } ; if ( $ security -> checkHash ( Arr :: fetch ( $ credentials , $ password ) , $ user -> getAuthPassword ( ) ) ) { return $ user ; } } return null ; }
Retrieve a user by credentials

@param array $credentials

@return \Neutrino\Foundation\Auth\User
Retrieve a user by credentials