Skip to content

Instantly share code, notes, and snippets.

@aleskiontherun
Last active August 29, 2015 14:12
Show Gist options
  • Save aleskiontherun/05d15cc8f889fe29c5e0 to your computer and use it in GitHub Desktop.
Save aleskiontherun/05d15cc8f889fe29c5e0 to your computer and use it in GitHub Desktop.
Yii login/session timeouts
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