Реализован функционал Mojang API

Исправлена ошибка доступа к authserver из-за перехода на использование хостов, а не доменов
This commit is contained in:
ErickSkrauch
2016-09-21 11:13:43 +03:00
parent 78e5d3e103
commit df1859f0c1
17 changed files with 576 additions and 10 deletions

View File

@@ -9,6 +9,7 @@ use common\components\UserFriendlyRandomKey;
use common\models\Account;
use common\models\confirmations\RegistrationConfirmation;
use common\models\EmailActivation;
use common\models\UsernameHistory;
use common\validators\LanguageValidator;
use common\validators\PasswordValidate;
use Ely\Email\Renderer;
@@ -108,6 +109,14 @@ class RegistrationForm extends ApiForm {
throw new ErrorException('Unable save email-activation model.');
}
$usernamesHistory = new UsernameHistory();
$usernamesHistory->account_id = $account->id;
$usernamesHistory->username = $account->username;
$usernamesHistory->applied_in = $account->created_at;
if (!$usernamesHistory->save()) {
throw new ErrorException('Cannot save username history record');
}
$this->sendMail($emailActivation, $account);
$changeUsernameForm = new ChangeUsernameForm();