I want to logged out a user from all browser when he change his current password. I have put the code into my controller function after saving the new passowrd into database:
$session = Yii::$app->session;
unset($session['id']);
unset($session['timestamp']);
$session->destroy();
It works only for the browser from where I changed my password. but not for all browser.
I have checked the session variable - $session['id']
is exists or not. I can see it exists in other browser even after I change my password from different browser.
Related issue @github/yii2:
User stays authorized despite auth key is changed #9718: https://github.com/yiisoft/yii2/issues/9718
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With