Last active
August 29, 2015 14:12
-
-
Save aleskiontherun/05d15cc8f889fe29c5e0 to your computer and use it in GitHub Desktop.
Yii login/session timeouts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CHttpSession.timout - session data will be cleaned up (default - 1440) | |
CHttpSession.cookieParams.lifetime - session cookie lifetime (default - 0 means "until the browser is closed.") | |
CWebUser.authTimeout - user is logged out if inactive (not set - after the current session expires) | |
CWebUser.absoluteAuthTimeout - user is logged out regardless of activity (not set - ommited) | |
== | |
CWebUser.allowAutoLogin = true | |
CWebUser.autoRenewCookie = false | |
CWebUser::login($identity, $duration) | |
$duration - set cookie with user data for this time from the initial log in (default 0 - do not set cookie) | |
== | |
CWebUser.allowAutoLogin = true | |
CWebUser.autoRenewCookie = true | |
CWebUser::login($identity, $duration) | |
$duration - set cookie with user data for this time after last activity (default 0 - do not set cookie) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment