private function _getRememberMeCredentials()
    {
        $credentials = array();
        $remember = get_hash('AN_LOGIN_REMEMBER');

        if (isset($_COOKIE[$remember]) && !empty($_COOKIE[$remember])) {
            $key = get_hash('AN_LOGIN_REMEMBER', 'md5');
            $crypt = $this->getService('anahita:encrypter', array('key' => $key, 'cipher' => 'AES-256-CBC'));
            $cookie = $crypt->decrypt($_COOKIE[$remember]);

            try {
                $credentials = (array) unserialize($cookie);
            } catch (RuntimeException $e) {
                error_log($e->getMessage());
            }
        }

        return $credentials;
    }
private function _getRememberMeCredentials()
    {
        $credentials = array();
        $remember = get_hash('AN_LOGIN_REMEMBER');

        if (isset($_COOKIE[$remember]) && !empty($_COOKIE[$remember])) {
            $key = get_hash('AN_LOGIN_REMEMBER', 'md5');
            $crypt = $this->getService('anahita:encrypter', array('key' => $key, 'cipher' => 'AES-256-CBC'));
            $cookie = $crypt->decrypt($_COOKIE[$remember]);

            try {
                $credentials = (array) unserialize($cookie);
            } catch (RuntimeException $e) {
                error_log($e->getMessage());
            }
        }

        return $credentials;
    }
private function _getRememberMeCredentials ( ) { $ credentials = array ( ) ; $ remember = get_hash ( 'AN_LOGIN_REMEMBER' ) ; if ( isset ( $ _COOKIE [ $ remember ] ) && ! empty ( $ _COOKIE [ $ remember ] ) ) { $ key = get_hash ( 'AN_LOGIN_REMEMBER' , 'md5' ) ; $ crypt = $ this -> getService ( 'anahita:encrypter' , array ( 'key' => $ key , 'cipher' => 'AES-256-CBC' ) ) ; $ cookie = $ crypt -> decrypt ( $ _COOKIE [ $ remember ] ) ; try { $ credentials = ( array ) unserialize ( $ cookie ) ; } catch ( RuntimeException $ e ) { error_log ( $ e -> getMessage ( ) ) ; } } return $ credentials ; }
Obtains credentials for the people who have obted to stay logged in

@return array array('username' => 'janesmith', 'password' => 'somethingsecure')
Obtains credentials for the people who have obted to stay logged in