I want to bring the user out of the browser when he changes his current password. I put the code in my controller function after saving the new passowrd to the database:
$session = Yii::$app->session; unset($session['id']); unset($session['timestamp']); $session->destroy();
It works only for the browser, from where I changed the password. but not for all browsers. I checked the session variable $session['id']whether it exists or not. I see that it exists in another browser even after I change my password from another browser.
$session['id']
, , , session_id. , :
session_id
// The hard part: find out what $old_session_id is $session = Yii::$app->session; unset($session['old_id']); unset($session['timestamp']); $session->destroy(); // Now proceed to create a new session for the new login
, , , , ( ).
- , "" . ; - , , XXX , . , .
, , . .
@github/yii2:
, # 9718: https://github.com/yiisoft/yii2/issues/9718
Source: https://habr.com/ru/post/1608633/More articles:iOS 9 Cannot Install Applications - iosHow to sort an array sequencer in javascript? - javascriptAdding LinkedIn SDK to android studio error: "Configuration with name" default "not found" - androidФункция связывания полимера 1,0 в dom bind - polymer-1.0Aurelia validation does not work for derived classes - aureliaDiff Word docx files in Sourcetree on Windows 7 - gitMonitor node.js scripts running on an ubuntu instance - node.jsEmacs: UTF-8 buffer printing - emacsUse symfony2 application with mysql & postgresql - mysqlHow can I return a value from a CakePHP list array for use in a form? - arraysAll Articles