Difference between #11 and #12 of
Checking for "expired" sessions/logins on the client side

Revision #12 has been created by le_top on Nov 22, 2014, 6:47:42 PM with the memo:

The corescript is jquery.ui (not jquery-ui)
« previous (#11) next (#13) »

Changes

Title unchanged

Checking for "expired" sessions/logins on the client side

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

csrf, login, cookie, UserIdentity, user auth, security, session, allowAutoLogin, Cache-Control

Content changed

[...]
* Call this somewhere in the page generation process (e.g., in the layout).
*
* @param int $timeout Time between checks in seconds.
*/
public static function MonitorSessionJQueryDialog($timeout=2,$showCloseButton=true) {
Yii::app()->clientScript->registerCoreScript('jquery
-.ui');
$title=CJavaScript::encode(Yii::t('app','Session Expired'));
$msg=CJavaScript::encode(CHtml::tag('div',array(),Yii::t('app','Your session expired and this page must be reloaded.')));
$btReload=CJavaScript::encode(Yii::t('app','Reload'));
if($showCloseButton) {
$btClose=CJavaScript::encode(Yii::t('app','Close'));
[...]
4 0
12 followers
Viewed: 35 364 times
Version: 1.1
Category: How-tos
Written by: le_top
Last updated by: le_top
Created on: Jun 12, 2013
Last updated: 9 years ago
Update Article

Revisions

View all history