Добавлено запоминание регистрационного IP адреса

This commit is contained in:
ErickSkrauch
2016-08-18 02:55:52 +03:00
parent 433f560f48
commit 59f51451d0
5 changed files with 63 additions and 0 deletions

View File

@@ -94,6 +94,7 @@ class RegistrationForm extends ApiForm {
$account->lang = $this->lang;
$account->status = Account::STATUS_REGISTERED;
$account->rules_agreement_version = LATEST_RULES_VERSION;
$account->setRegistrationIp(Yii::$app->request->getUserIP());
if (!$account->save()) {
throw new ErrorException('Account not created.');
}