mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-06 14:19:23 +08:00
Update PHPDoc, CHANGELOG, UPGRADE.md
This commit is contained in:
@ -5,11 +5,12 @@ Yii Framework 2 Change Log
|
||||
2.0.9 under development
|
||||
-----------------------
|
||||
|
||||
- Enh #8795: Refactored `yii\web\User::loginByCookie()` in order to make it easier to override (maine-mike, silverfire)
|
||||
- Enh #11195: Added ability to append custom string to schema builder column definition (df2, samdark)
|
||||
- Enh #8795: Move Identity Cookie code into separate functions and cleanup invalid identity cookies
|
||||
- Enh #8795: Move Identity Cookie code into separate functions and cleanup invalid identity cookies (maine-mike)
|
||||
- Enh #8795 Move Identity Cookie code into separate functions and cleanup invalid identity cookies (maine-mike)
|
||||
-Enh #11195: Added ability to append custom string to schema builder column definition (df2, samdark)
|
||||
- Enh #11195: Added ability to append custom string to schema builder column definition (df2, samdark)
|
||||
- Enh #11195: Added ability to append custom string to schema builder column definition (df2, samdark)
|
||||
- Enh #11490: Added `yii\data\ArrayDataProvider::$modelClass` property to specify a model used to provide column labels even when data array is empty (PowerGamer1)
|
||||
- Enh #11591: Added support for wildcards for `only` and `except` at `yii\base\ActionFilter` (klimov-paul)
|
||||
|
@ -15,6 +15,12 @@ php composer.phar self-update
|
||||
php composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
|
||||
```
|
||||
|
||||
Upgrade from Yii 2.0.8
|
||||
----------------------
|
||||
|
||||
* Part of code from `yii\web\User::loginByCookie()` method was moved to new `getIdentityAndDurationFromCookie()`
|
||||
and `removeIdentityCookie()` methods. If you override `loginByCookie()` method, update it in order use new methods.
|
||||
|
||||
Upgrade from Yii 2.0.7
|
||||
----------------------
|
||||
|
||||
|
@ -549,12 +549,13 @@ class User extends Component
|
||||
* This method attempts to authenticate a user using the information in the identity cookie.
|
||||
* @return array|null Returns an array of 'identity' and 'duration' if valid, otherwise null.
|
||||
* @see loginByCookie()
|
||||
* @since 2.0.9
|
||||
*/
|
||||
protected function getIdentityAndDurationFromCookie()
|
||||
{
|
||||
$value = Yii::$app->getRequest()->getCookies()->getValue($this->identityCookie['name']);
|
||||
if ($value === null) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
$data = json_decode($value, true);
|
||||
if (count($data) == 3) {
|
||||
@ -573,12 +574,13 @@ class User extends Component
|
||||
}
|
||||
}
|
||||
$this->removeIdentityCookie();
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the identity cookie.
|
||||
* This method is used when [[enableAutoLogin]] is true.
|
||||
* @since 2.0.9
|
||||
*/
|
||||
protected function removeIdentityCookie()
|
||||
{
|
||||
|
Reference in New Issue
Block a user