protected function authorizeIp()
    {
        //In unit test REMOTE_ADDR is not available and will return null
        $request = $this->getRequest();

        // E.g. command line user
        if (! $request instanceof \Zend_Controller_Request_Http) {
            return true;
        }

        $remoteIp = $request->getServer('REMOTE_ADDR');
        if ($this->util->isAllowedIP($remoteIp, $this->getAllowedIPRanges())) {
            return true;
        }

        return $this->_('You are not allowed to login from this location.');
    }
protected function authorizeIp()
    {
        //In unit test REMOTE_ADDR is not available and will return null
        $request = $this->getRequest();

        // E.g. command line user
        if (! $request instanceof \Zend_Controller_Request_Http) {
            return true;
        }

        $remoteIp = $request->getServer('REMOTE_ADDR');
        if ($this->util->isAllowedIP($remoteIp, $this->getAllowedIPRanges())) {
            return true;
        }

        return $this->_('You are not allowed to login from this location.');
    }
protected function authorizeIp ( ) { //In unit test REMOTE_ADDR is not available and will return null $ request = $ this -> getRequest ( ) ; // E.g. command line user if ( ! $ request instanceof \ Zend_Controller_Request_Http ) { return true ; } $ remoteIp = $ request -> getServer ( 'REMOTE_ADDR' ) ; if ( $ this -> util -> isAllowedIP ( $ remoteIp , $ this -> getAllowedIPRanges ( ) ) ) { return true ; } return $ this -> _ ( 'You are not allowed to login from this location.' ) ; }
Checks if the user is allowed to login using the current IP address
according to the group he is in

An adapter authorizes and if the end resultis boolean, string or array
it is converted into a Zend\Authenticate\Result.

@return mixed Zend\Authentication\Adapter\AdapterInterface|Zend\Authenticate\Result|boolean|string|array
Checks if the user is allowed to login using the current IP address according to the group he is in