mirror of
https://github.com/elyby/accounts.git
synced 2024-11-10 07:22:00 +05:30
Метод save на модели Accounts теперь вызывается без аргумента false, т.к. из модели были удалены валидаторы
This commit is contained in:
parent
3cce2c9bd1
commit
b6b579b721
@ -31,7 +31,7 @@ class ConfirmEmailForm extends KeyConfirmationForm {
|
||||
throw new ErrorException('Unable remove activation key.');
|
||||
}
|
||||
|
||||
if (!$account->save(false)) {
|
||||
if (!$account->save()) {
|
||||
throw new ErrorException('Unable activate user account.');
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ class RegistrationForm extends ApiForm {
|
||||
$account->status = Account::STATUS_REGISTERED;
|
||||
$account->rules_agreement_version = LATEST_RULES_VERSION;
|
||||
$account->setRegistrationIp(Yii::$app->request->getUserIP());
|
||||
if (!$account->save(false)) {
|
||||
if (!$account->save()) {
|
||||
throw new ErrorException('Account not created.');
|
||||
}
|
||||
|
||||
|
@ -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(false)) {
|
||||
if (!$account->save()) {
|
||||
throw new ErrorException('Cannot set user rules version');
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ class ChangeLanguageForm extends ApiForm {
|
||||
|
||||
$account = $this->getAccount();
|
||||
$account->lang = $this->lang;
|
||||
if (!$account->save(false)) {
|
||||
if (!$account->save()) {
|
||||
throw new ErrorException('Cannot change user language');
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ class ChangePasswordForm extends ApiForm {
|
||||
}
|
||||
}
|
||||
|
||||
if (!$account->save(false)) {
|
||||
if (!$account->save()) {
|
||||
throw new ErrorException('Cannot save user model');
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ class ChangeUsernameForm extends ApiForm {
|
||||
$oldNickname = $account->username;
|
||||
try {
|
||||
$account->username = $this->username;
|
||||
if (!$account->save(false)) {
|
||||
if (!$account->save()) {
|
||||
throw new ErrorException('Cannot save account model with new username');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user