Отключаем валидацию для форм, где не участвуют email и username

This commit is contained in:
ErickSkrauch 2016-10-25 11:45:55 +03:00
parent 20b0076672
commit cfd8ba95ef
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ class RecoverPasswordForm extends KeyConfirmationForm {
throw new ErrorException('Unable remove activation key.'); throw new ErrorException('Unable remove activation key.');
} }
if (!$account->save()) { if (!$account->save(false)) {
throw new ErrorException('Unable activate user account.'); throw new ErrorException('Unable activate user account.');
} }

View File

@ -21,7 +21,7 @@ class AcceptRulesForm extends ApiForm {
public function agreeWithLatestRules() : bool { public function agreeWithLatestRules() : bool {
$account = $this->getAccount(); $account = $this->getAccount();
$account->rules_agreement_version = LATEST_RULES_VERSION; $account->rules_agreement_version = LATEST_RULES_VERSION;
if (!$account->save()) { if (!$account->save(false)) {
throw new ErrorException('Cannot set user rules version'); throw new ErrorException('Cannot set user rules version');
} }