/** @inheritdoc */ public function beforeValidate() { if (parent::beforeValidate()) { $this->user = User::findIdentityByLogin($this->login); return true; } else { return false; } }