Changing Login Timeout Length

I’ve been trying to change the length of time before the system logs out a user. I’ve tried the following in /protected/config/main.php:



'components'=>array(


                'user'=>array(


                        // enable cookie-based authentication


                        'class'=>'application.components.WebUser',


                        'allowAutoLogin'=>true,


                ),


                'session'=>array(


                        'timeout'=>1,


                ),

of course changing timeout to various values, but even at 1 it doesn’t log the user out in 1 second. I’ve also tried changing the login method in /protected/models/LoginForm.php:



public function login()


{


      if($this->_identity===null)


      {


            $this->_identity=new UserIdentity($this->username,$this->password);


            $this->_identity->authenticate();


      }


      if($this->_identity->errorCode===UserIdentity::ERROR_NONE)


      {


            $duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days


            Yii::app()->user->login($this->_identity,$duration);


            return true;


      }


      else


            return false;


}

I’ve tried making $duration larger, smaller, and taking that argument out and it doesn’t change anything. My users are still being logged out in about an hour or so. Any help is appreciated - I just want the users to be able to stay logged in for 8-12 hours so that they don’t walk away from their computer, come back, refresh the page and have to log in again. Thanks!

Any1? Or am I doing it right already and it’s just not working for some reason?

Hi!

What about CWebUser.authTimeout?

Dear Friend

I hope this is what you expect!.




'components'=>array(

		'user'=>array(

			// enable cookie-based authentication

			'allowAutoLogin'=>true,

			'authTimeout'=>5  // may be 8*60*60 for eight hours!

		),



Regards.

Thank you guys! That was it.