Фиксы после инспекции кода новым инспектором в PHPStorm

В некоторых формах отключена валидация при сохранении модели аккаунта
This commit is contained in:
ErickSkrauch
2016-11-01 19:36:39 +03:00
parent 7ec87e0602
commit 3b56f3c418
11 changed files with 17 additions and 18 deletions

View File

@ -17,7 +17,7 @@ class ConfirmEmailForm extends KeyConfirmationForm {
}
$confirmModel = $this->getActivationCodeModel();
if ($confirmModel->type != EmailActivation::TYPE_REGISTRATION_EMAIL_CONFIRMATION) {
if ($confirmModel->type !== EmailActivation::TYPE_REGISTRATION_EMAIL_CONFIRMATION) {
$confirmModel->delete();
// TODO: вот где-то здесь нужно ещё попутно сгенерировать соответствующую ошибку
return false;
@ -31,7 +31,7 @@ class ConfirmEmailForm extends KeyConfirmationForm {
throw new ErrorException('Unable remove activation key.');
}
if (!$account->save()) {
if (!$account->save(false)) {
throw new ErrorException('Unable activate user account.');
}