- FIX

parent c10b8cfc
...@@ -511,15 +511,19 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter ...@@ -511,15 +511,19 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
} }
return parent::beforeSave($insert);
}
public function afterValidate() {
parent::afterValidate();
if ($this->scenario===self::SCENARIO_REGISTRATION) { if ($this->scenario===self::SCENARIO_REGISTRATION) {
$this->addError('email', 'asd'); $this->addError('email', 'asd');
return false; return false;
return $this->afterRegistration(['email' => $this->email]); return $this->afterRegistration(['email' => $this->email]);
} }
}
return parent::beforeSave($insert);
}
public function beforeDelete() public function beforeDelete()
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment