Update LoginForm model added method setUser (#484)

This commit is contained in:
liviuk2
2022-12-16 11:59:46 +01:00
committed by GitHub
parent f604a8e6d1
commit 4c9ef3df9b
2 changed files with 12 additions and 0 deletions

View File

@ -39,6 +39,7 @@ There's a change in flash messages handling, please see #391
- Fix: Clear 2FA auth key when feature is disabled by user - Fix: Clear 2FA auth key when feature is disabled by user
- Fix: check user before accessing 2FA code - Fix: check user before accessing 2FA code
- Enh: added `AdminController` REST controller (MatteoF96) - Enh: added `AdminController` REST controller (MatteoF96)
- Enh: added method `setUser` for LoginForm model (liviuk2)
## 1.5.1 April 5, 2020 ## 1.5.1 April 5, 2020

View File

@ -23,6 +23,7 @@ use Yii;
use yii\base\InvalidParamException; use yii\base\InvalidParamException;
use yii\base\Model; use yii\base\Model;
use yii\helpers\ArrayHelper; use yii\helpers\ArrayHelper;
use yii\web\IdentityInterface;
class LoginForm extends Model class LoginForm extends Model
{ {
@ -186,4 +187,14 @@ class LoginForm extends Model
{ {
return $this->user; return $this->user;
} }
/**
* @param IdentityInterface $user
* @return User
*/
public function setUser(IdentityInterface $user)
{
return $this->user = $user;
}
} }