From c828b8e1e694c15783415741945910dfae9cedb4 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Tue, 25 Oct 2016 22:33:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BE=D1=88=D0=B8?= =?UTF-8?q?=D0=B1=D0=BA=D0=B8=20=D0=B2=20=D1=84=D0=BE=D1=80=D0=BC=D0=B5=20?= =?UTF-8?q?=D1=81=D0=BC=D0=B5=D0=BD=D1=8B=20=D0=BD=D0=B8=D0=BA=D0=B0,=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=B3=D0=B4=D0=B0=20=D1=81=D1=82=D0=B0=D1=80=D1=8B?= =?UTF-8?q?=D0=B9=20=D0=BD=D0=B8=D0=BA=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B7?= =?UTF-8?q?=D0=B0=D1=82=D0=B8=D1=80=D0=B0=D0=BB=D1=81=D1=8F=20=D0=BD=D0=B0?= =?UTF-8?q?=20=D1=8D=D1=82=D0=B0=D0=BF=D0=B5=20=D0=B2=D0=B0=D0=BB=D0=B8?= =?UTF-8?q?=D0=B4=D0=B0=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/models/profile/ChangeUsernameForm.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/models/profile/ChangeUsernameForm.php b/api/models/profile/ChangeUsernameForm.php index b35d2be..ef7f069 100644 --- a/api/models/profile/ChangeUsernameForm.php +++ b/api/models/profile/ChangeUsernameForm.php @@ -6,6 +6,7 @@ use api\models\base\ApiForm; use api\validators\PasswordRequiredValidator; use common\helpers\Error; use common\helpers\Amqp; +use common\models\Account; use common\models\amqp\UsernameChanged; use common\models\UsernameHistory; use Exception; @@ -28,7 +29,7 @@ class ChangeUsernameForm extends ApiForm { } public function validateUsername($attribute) { - $account = $this->getAccount(); + $account = new Account(); $account->username = $this->$attribute; if (!$account->validate(['username'])) { $this->addErrors($account->getErrors());