Wiki

Articles tagged with "session"X
Displaying 1-7 of 7 result(s).

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

Created 6 days ago by le_topHow-tos0 comments – viewed 984 times – ( +2 )
Two utility functions to avoid invalid CSRF, ajax request, etc, because for some reason the client session or login ended or changed.

Store session in database

Created 26 days ago by StagelineHow-tos6 comments – viewed 1,983 times – ( +3 / -6 )
'session'=>array( 'class'=>'system.web.

Show captcha after <N> unsuccessfull attempts

Created about a year ago by zitterHow-tos6 comments – viewed 7,936 times – ( +14 / -3 )
In this mini howto I would like to show how to add a required captcha field in the login form, after a defined number of unsuccessfull attempts. To do this, I will use the blog demo that you have in default Yii download package (path/to/yii/demos/blog).

Using loginRequiredAjaxResponse to solve ajax session timeout

Created about a year ago by RutgerHow-tos3 comments – viewed 9,815 times – ( +12 )
This solution requires Yii 1.1.9 or above

Manage (Target) Language in Multilingual Applications + A Language Selector Widget (i18n)

Created about a year ago by c@cbaTutorials9 comments – viewed 15,478 times – ( +9 )
In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language. This tutorial shows a Yii-way of doing this. We implement an event handler for the onBeginRequest event; as the name of the event suggests, this event handler will be called at the beginning of each request, so its a good place to check whether a language is provided (via post, session or cookie) and set the application language accordingly. We also implement a simple Language-Selector Widget, which can render the language options as ajax-links or as a drop-down list.

How to validate CSRF token with session

Created about a year ago by yangmlsHow-tos0 comments – viewed 18,649 times – ( +17 )
First of all, You must change component config to enable the default Yii CSRF validation.
tags: CSRF, session

Single sign on across multiple subdomains

Created 2 years ago by ianarĂ©How-tos6 comments – viewed 16,321 times – ( +22 )
This had me stumped for a while so I figured it would be nice to share here to avoid others the grief.