- Заменили процедуру триггеров с валидации на postSave

parent 1be3a3b7
......@@ -502,11 +502,19 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
if (!parent::validate($attributeNames = null, $clearErrors = true))
return false;
// if ($this->scenario===self::SCENARIO_REGISTRATION || $this->scenario===self::SCENARIO_SOCIAL_REGISTRATION) {
// if (!$this->afterRegistration(['email' => $this->email, 'user_fio' => $this->getFio()]))
// return false;
// }
return true;
}
public function afterSave()
{
if ($this->scenario===self::SCENARIO_REGISTRATION || $this->scenario===self::SCENARIO_SOCIAL_REGISTRATION) {
if (!$this->afterRegistration(['email' => $this->email, 'user_fio' => $this->getFio()]))
return false;
}
return true;
}
public function afterDelete()
......
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