public function authenticate($email, $password)
    {
        // If we're operating in secure-only mode.
        if ($this->config->getCookieSslOnly() && !isset($_SERVER['HTTPS'])) {
            echo 'Connection is insecure, login cannot proceed.';
            die();
        }

        // Check credentials.
        if ($this->config->getAdminEmail() != $email
            || !Encryption::verify($password, $this->config->getAdminPasswordHash()))
        {
            return false; // Authentication failure.
        }

        // Set cookie to newly dispensed token.
        $this->setCookieToken($this->dispenseToken());

        return true;
    }
public function authenticate($email, $password)
    {
        // If we're operating in secure-only mode.
        if ($this->config->getCookieSslOnly() && !isset($_SERVER['HTTPS'])) {
            echo 'Connection is insecure, login cannot proceed.';
            die();
        }

        // Check credentials.
        if ($this->config->getAdminEmail() != $email
            || !Encryption::verify($password, $this->config->getAdminPasswordHash()))
        {
            return false; // Authentication failure.
        }

        // Set cookie to newly dispensed token.
        $this->setCookieToken($this->dispenseToken());

        return true;
    }
public function authenticate ( $ email , $ password ) { // If we're operating in secure-only mode. if ( $ this -> config -> getCookieSslOnly ( ) && ! isset ( $ _SERVER [ 'HTTPS' ] ) ) { echo 'Connection is insecure, login cannot proceed.' ; die ( ) ; } // Check credentials. if ( $ this -> config -> getAdminEmail ( ) != $ email || ! Encryption :: verify ( $ password , $ this -> config -> getAdminPasswordHash ( ) ) ) { return false ; // Authentication failure. } // Set cookie to newly dispensed token. $ this -> setCookieToken ( $ this -> dispenseToken ( ) ) ; return true ; }
Authenticates the given e-mail address password pair.

@param string $email     the e-mail address to authenticate
@param string $password  the password to authenticate
@return bool
Authenticates the given e - mail address password pair .