User can login by cookie only once when autoRenewCookie is set to false

This commit is contained in:
shirase
2017-05-18 01:54:50 +03:00
committed by SilverFire - Dmitry Naumenko
parent 1d44de7b15
commit b6a5697c00
2 changed files with 2 additions and 1 deletions

View File

@ -70,6 +70,7 @@ Yii Framework 2 Change Log
- Bug #11230: Include `defaultRoles` in `yii\rbac\DbManager->getRolesByUser()` results (developeruz) - Bug #11230: Include `defaultRoles` in `yii\rbac\DbManager->getRolesByUser()` results (developeruz)
- Bug #11404: `yii\base\Model::loadMultiple()` returns true even if `yii\base\Model::load()` returns false (zvook) - Bug #11404: `yii\base\Model::loadMultiple()` returns true even if `yii\base\Model::load()` returns false (zvook)
- Bug #11719: Fixed `yii\db\Connection::$enableQueryCache` caused infinite loop when the same connection was used for `yii\caching\DbCache` (michaelarnauts) - Bug #11719: Fixed `yii\db\Connection::$enableQueryCache` caused infinite loop when the same connection was used for `yii\caching\DbCache` (michaelarnauts)
- Bug #11825: User can login by cookie only once when `autoRenewCookie` is set to false (shirase)
- Bug #12715: Exception `SAVEPOINT LEVEL1 does not exist` instead of deadlock exception (Vovan-VE) - Bug #12715: Exception `SAVEPOINT LEVEL1 does not exist` instead of deadlock exception (Vovan-VE)
- Bug #13058: Fixed caught exception thrown during view file rendering produces wrong output (klimov-paul) - Bug #13058: Fixed caught exception thrown during view file rendering produces wrong output (klimov-paul)
- Bug #13086, #13656: Fixed bug with optional parameters at the beginning of pattern in `yii\web\UrlRule` (rob006) - Bug #13086, #13656: Fixed bug with optional parameters at the beginning of pattern in `yii\web\UrlRule` (rob006)

View File

@ -609,7 +609,7 @@ class User extends Component
} }
/* Ensure any existing identity cookies are removed. */ /* Ensure any existing identity cookies are removed. */
if ($this->enableAutoLogin) { if ($this->enableAutoLogin && ($this->autoRenewCookie || !$identity)) {
$this->removeIdentityCookie(); $this->removeIdentityCookie();
} }