{}Complete Login and Registration System

Posted in CategoryGeneral Discussion
  • Gani Ali 10 months ago

    OK thanks 

  • Terry Ogbemudia 10 months ago

    the code is okay and not buggy you should check your opera browser settings and also try on chrome just to confirm.

  • Gani Ali 10 months ago

    What should i change it to ?

  • Terry Ogbemudia 10 months ago

    You can change the auto logout time in the guard function which is inside utilities.php 

  • Gani Ali 10 months ago

    I found the code the system works very well in Firefox. But always logout automatically on Opera, Google Chrome and many others. this is the block of code that need to be corrected.

     

    function guard(){

     

        $isValid = true;

        $inactive = 60 * 15; //15 mins

        $fingerprint = md5($_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']);

     

        if((isset($_SESSION['fingerprint']) && $_SESSION['fingerprint'] != $fingerprint)){

            $isValid = false;

            signout();

        }else if((isset($_SESSION['last_active']) && (time() - $_SESSION['last_active']) > $inactive) && $_SESSION['username']){

            $isValid = false;

            signout();

        }else{

            $_SESSION['last_active'] = time();

        }

     

        return $isValid;

    }

     

    The signout(); is the problem there. 

  • Gani Ali 10 months ago

    The system automatically log-out every (5s) when on the live server i really do not know how i can fix this, I am using godaddy. 

Please login or register to leave a response.