From 5a88229c2dbb5ddeeb7ea04ea0d9ae16049449fb Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Thu, 27 Oct 2016 00:06:59 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D1=91=D0=BC=20?= =?UTF-8?q?=D1=81=D0=BE=D0=B1=D1=8B=D1=82=D0=B8=D0=B5=20=D0=BE=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=BE=D0=BC=20=D0=BD=D0=B8=D0=BA=D0=B5=20=D1=82?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE=20=D0=BF=D1=80=D0=B8=20=D1=83?= =?UTF-8?q?=D1=81=D0=BF=D0=B5=D1=88=D0=BD=D0=BE=D0=B9=20=D1=80=D0=B5=D0=B3?= =?UTF-8?q?=D0=B8=D1=81=D1=82=D1=80=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/authentication/ConfirmEmailForm.php | 4 ++++ api/models/authentication/RegistrationForm.php | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/models/authentication/ConfirmEmailForm.php b/api/models/authentication/ConfirmEmailForm.php index 0c46680..587ac7d 100644 --- a/api/models/authentication/ConfirmEmailForm.php +++ b/api/models/authentication/ConfirmEmailForm.php @@ -3,6 +3,7 @@ namespace api\models\authentication; use api\models\AccountIdentity; use api\models\base\KeyConfirmationForm; +use api\models\profile\ChangeUsernameForm; use common\models\Account; use common\models\EmailActivation; use Yii; @@ -34,6 +35,9 @@ class ConfirmEmailForm extends KeyConfirmationForm { throw new ErrorException('Unable activate user account.'); } + $changeUsernameForm = new ChangeUsernameForm(); + $changeUsernameForm->createEventTask($account->id, $account->username, null); + $transaction->commit(); } catch (ErrorException $e) { $transaction->rollBack(); diff --git a/api/models/authentication/RegistrationForm.php b/api/models/authentication/RegistrationForm.php index 41e71ee..776da8f 100644 --- a/api/models/authentication/RegistrationForm.php +++ b/api/models/authentication/RegistrationForm.php @@ -4,7 +4,6 @@ namespace api\models\authentication; use api\components\ReCaptcha\Validator as ReCaptchaValidator; use api\models\base\ApiForm; use common\helpers\Error as E; -use api\models\profile\ChangeUsernameForm; use common\components\UserFriendlyRandomKey; use common\models\Account; use common\models\confirmations\RegistrationConfirmation; @@ -118,9 +117,6 @@ class RegistrationForm extends ApiForm { $this->sendMail($emailActivation, $account); - $changeUsernameForm = new ChangeUsernameForm(); - $changeUsernameForm->createEventTask($account->id, $account->username, null); - $transaction->commit(); } catch (Exception $e) { $transaction->rollBack();