Articles tagged with "session", sorted by commentsX
Displaying 1-10 of 11 result(s).

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

Created 3 years ago by c@cbaTutorials10 comments – viewed 31,460 times – ( +15 ) – version 1.1
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.

Single sign on across multiple subdomains

Created 4 years ago by ianarĂ©How-tos10 comments – viewed 36,660 times – ( +32 ) – version 1.1
This had me stumped for a while so I figured it would be nice to share here to avoid others the grief.

Show captcha after <N> unsuccessfull attempts

Created 3 years ago by zitterHow-tos7 comments – viewed 17,414 times – ( +15 / -4 ) – version 1.1
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 3 years ago by RutgerHow-tos3 comments – viewed 22,494 times – ( +13 ) – version 1.1
This solution requires Yii 1.1.9 or above

Configuring different sessions for backend and frontend in Yii advanced app

Created about a year ago by Kartik VHow-tos2 comments – viewed 12,089 times – ( +46 ) – version 2.0
After you have setup your Yii2 advanced application, you now have setup your user authentication for both frontend and backend. However, if you have first logged into frontend, and try to access backend from the same client machine, you see no login screen, but find yourself automatically logged in.

Yii2: Configuring different sessions for backend and frontend in Yii Advanced Application Template

Created 11 months ago by hrnairHow-tos2 comments – viewed 10,901 times – ( +6 ) – version 2.0
This is as an extension of this wiki by Kartik V which shows to make different enableAutoLogin cookies for frontend and backend.

How to validate CSRF token with session

Created 3 years ago by yangmlsHow-tos1 comment – viewed 42,367 times – ( +22 ) – version 1.1
First of all, You must change component config to enable the default Yii CSRF validation.
tags: CSRF, session

Use kartik Growl with Yii2 flash messages

Created 6 months ago by skwordenHow-tos1 comment – viewed 7,553 times – ( +6 ) – version 2.0
This is to show you how to use Yii2 flash messages with Kartik Growl (bootstrap notify wrapper).

[Guide] How to actually separate Frontend (User) and Backend (Admin) on Yii2 Advanced

Created 5 months ago by Wade ShulerHow-tos1 comment – viewed 13,816 times – ( +9 / -1 ) – version 2.0
I am writing this guide because I struggled to find a resource that included ALL of the necessary steps to completely separate the frontend from the backend. After reading guides like Configuring different sessions for backend and frontend in yii-advanced-app and yii2 configuring different sessions for backend and frontend in yii advanced application template, there are still steps missing. It is funny how the 2nd one says it is an extension of the first one's article. So I guess, my wiki guide here is yet a 3rd and more complete extension of both of them. I also found a few StackOverflow questions and blog posts regarding this topic. None of them fully worked, and must be missing some magic sauce!

Make the authentication more securely

Created about a year ago by Kostas Apazidis (KonApaz)Tutorials1 comment – viewed 4,187 times – ( +3 ) – version 1.1
Suppose a hacker has an account of your website He could set the PHPSESSID to empty After of that He login in your system The PHPSESSID remains blank and user has already logged with this session