diff --git a/models/User.php b/models/User.php index cc0abf42b..05fcfb547 100644 --- a/models/User.php +++ b/models/User.php @@ -16,6 +16,7 @@ use dektrium\user\Mailer; use dektrium\user\Module; use dektrium\user\traits\ModuleTrait; +use Yii; use yii\base\NotSupportedException; use yii\behaviors\TimestampBehavior; use yii\db\ActiveRecord; @@ -564,4 +565,11 @@ public static function findIdentityByAccessToken($token, $type = null) { throw new NotSupportedException('Method "' . __CLASS__ . '::' . __METHOD__ . '" is not implemented.'); } + + /** @inheritdoc */ + public static function instantiate($row) + { + return Yii::createObject(static::className()); + } + }