{"action":"opened","issue":{"url":"https://api.github.com/repos/yiisoft/yii/issues/3734","labels_url":"https://api.github.com/repos/yiisoft/yii/issues/3734/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii/issues/3734/comments","events_url":"https://api.github.com/repos/yiisoft/yii/issues/3734/events","html_url":"https://github.com/yiisoft/yii/issues/3734","id":56108298,"number":3734,"title":"Session timeout question","user":{"login":"lkebin","id":1335935,"avatar_url":"https://avatars.githubusercontent.com/u/1335935?v=3","gravatar_id":"","url":"https://api.github.com/users/lkebin","html_url":"https://github.com/lkebin","followers_url":"https://api.github.com/users/lkebin/followers","following_url":"https://api.github.com/users/lkebin/following{/other_user}","gists_url":"https://api.github.com/users/lkebin/gists{/gist_id}","starred_url":"https://api.github.com/users/lkebin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkebin/subscriptions","organizations_url":"https://api.github.com/users/lkebin/orgs","repos_url":"https://api.github.com/users/lkebin/repos","events_url":"https://api.github.com/users/lkebin/events{/privacy}","received_events_url":"https://api.github.com/users/lkebin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-31T02:16:29Z","updated_at":"2015-01-31T02:16:29Z","closed_at":null,"body":"I want setup a more session timeout value after user login.\r\nI was override `CWebUser::beforeLogin`\r\n\r\n```php\r\nclass WebUser extends CWebUser\r\n{\r\n\tprotected function beforeLogin($id,$states,$fromCookie)\r\n\t{\r\n\t\tYii::app()->getSession()->setTimeout(1440);\r\n\t\tYii::app()->getSession()->setCookieParams(['lifetime'=>1440]);\r\n\t\tYii::app()->getSession()->open();\r\n\t\treturn true;\r\n\t}\r\n}\r\n```\r\nIn `config/main.php`:\r\n\r\n```php\r\n...\r\n'session' => array(\r\n            'class' => 'system.web.CCacheHttpSession',\r\n            'cacheID' => 'sessCache',\r\n            'cookieParams' => array(\r\n                'httponly' => true,\r\n            ),\r\n            'timeout' => 30,\r\n\t\t\t'cookieMode'=>'only',\r\n\t\t\t'autoStart'=>false\r\n        )\r\n...\r\n```\r\n\r\nWhen the user login successfully and redirect to other page. the user session timeout has changed to `30`. but when I abort script before `redirect()` then the session and session cookie timeout are my expect result, them life time are `1440`."}}