Метод save на модели Accounts теперь вызывается без аргумента false, т.к. из модели были удалены валидаторы

This commit is contained in:
ErickSkrauch 2016-11-02 00:02:58 +03:00
parent 3cce2c9bd1
commit b6b579b721
6 changed files with 6 additions and 6 deletions

View File

@ -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.');
}

View File

@ -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.');
}

View File

@ -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');
}

View File

@ -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');
}

View File

@ -77,7 +77,7 @@ class ChangePasswordForm extends ApiForm {
}
}
if (!$account->save(false)) {
if (!$account->save()) {
throw new ErrorException('Cannot save user model');
}

View File

@ -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');
}