Difference between #2 and #3 of
Using loginRequiredAjaxResponse to solve ajax session timeout

Changes

Title unchanged

Using loginRequiredAjaxResponse to solve ajax session timeout

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

loginRequiredAjaxResponse, session, login, AJAX

Content changed

[...]
```php
<?php
if (Yii::app()->components['user']->loginRequiredAjaxResponse){
Yii::app()->clientScript->registerScript('ajaxLoginRequired', '
jQuery(
"body"document).ajaxComplete(
function(event, request, options) {
if (request.responseText == "'.Yii::app()->components['user']->loginRequiredAjaxResponse.'") {
window.location.href = options.url;
}
}
[...]
12 0
16 followers
Viewed: 37 439 times
Version: 1.1
Category: How-tos
Written by: Rutger
Last updated by: Rutger
Created on: Apr 11, 2012
Last updated: 7 years ago
Update Article

Revisions

View all history