Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • In cakephp different session timeouts for admin and front end users

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 328
    Comment on it

    In cakephp you can handle different session time outs for admin and front end users.I added the following lines in core.php file and it works for me.

    if(strripos($_SERVER['REQUEST_URI'],"admin")) {
    
    Configure::write('Session', array(
       'defaults' => 'php',
        'cookieTimeout' => 1440,
       'timeout' => 30,
       'checkAgent' => false,
        'autoRegenerate' => true,
    )); 
    }
    else
    {
    
    Configure::write('Session', array(
          'defaults' => 'php',
          'cookieTimeout' => 1440,
         'timeout' => 20,
        'checkAgent' => false,
          'autoRegenerate' => true,
        ));
    }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: