Logon duration

Hi guys, brand new to yii. I’m using the automatically generated web app and tweaking it for my own needs. By default the logon duration is 30 days or something, does anyone know how I change it to expire when the users session expires, i.e. when they log out?

Use the 2nd parameter of CWebUser. So you have


Yii::app()->user->login($ui, 30*60);

it’s being done in /models/LoginForm.php… you will find a variable named $duration in login function -


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