src/twofactorDir.php
public function redirectCheck()
    {
        if(isset($_COOKIE['twofactorDir-'.$this->dir]) && $_COOKIE['twofactorDir-'.$this->dir] == $this->cookieCode)
        {
            self::redirect();
            return true;
        }else
        {
            return false;
        }
    }
public function redirectCheck()
    {
        if(isset($_COOKIE['twofactorDir-'.$this->dir]) && $_COOKIE['twofactorDir-'.$this->dir] == $this->cookieCode)
        {
            self::redirect();
            return true;
        }else
        {
            return false;
        }
    }
public function redirectCheck ( ) { if ( isset ( $ _COOKIE [ 'twofactorDir-' . $ this -> dir ] ) && $ _COOKIE [ 'twofactorDir-' . $ this -> dir ] == $ this -> cookieCode ) { self :: redirect ( ) ; return true ; } else { return false ; } }
CAUTION this method uses cookie, it must be called before any print
this method check if the cookie exists and if it is correct, if it is correct the method perform redirect
@return bool true if the redirect is done
CAUTION this method uses cookie it must be called before any print this method check if the cookie exists and if it is correct if it is correct the method perform redirect