mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Реализован функционал Mojang API
Исправлена ошибка доступа к authserver из-за перехода на использование хостов, а не доменов
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user