mirror of
https://github.com/elyby/accounts.git
synced 2024-11-27 01:02:06 +05:30
Отключаем валидацию для форм, где не участвуют email и username
This commit is contained in:
parent
20b0076672
commit
cfd8ba95ef
@ -52,7 +52,7 @@ class RecoverPasswordForm extends KeyConfirmationForm {
|
||||
throw new ErrorException('Unable remove activation key.');
|
||||
}
|
||||
|
||||
if (!$account->save()) {
|
||||
if (!$account->save(false)) {
|
||||
throw new ErrorException('Unable activate user account.');
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ class AcceptRulesForm extends ApiForm {
|
||||
public function agreeWithLatestRules() : bool {
|
||||
$account = $this->getAccount();
|
||||
$account->rules_agreement_version = LATEST_RULES_VERSION;
|
||||
if (!$account->save()) {
|
||||
if (!$account->save(false)) {
|
||||
throw new ErrorException('Cannot set user rules version');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user