Исправление ошибок с тегами

This commit is contained in:
Arsen Mirzaev Tatyano-Muradovich 2021-02-25 03:10:29 +10:00
parent b91ef68091
commit b8c1f7cef0
3 changed files with 8 additions and 5 deletions

View File

@ -1,9 +1,12 @@
<?php
declare(strict_types=1);
namespace app\models;
use Yii;
use yii;
use yii\base\Model;
use app\models\Account;
/**
@ -94,7 +97,7 @@ class AccountForm extends Model
// Проверка пройдена
// Аутентификация
return Yii::$app->user->login($this->getAccount(), $this->auto ? 3600 * 24 * 30 : 0);
return yii::$app->user->login($this->getAccount(), $this->auto ? 3600 * 24 * 30 : 0);
}
return false;
@ -113,7 +116,7 @@ class AccountForm extends Model
// Запись параметров
$this->account->mail = $this->mail;
$this->account->pswd = Yii::$app->security->generatePasswordHash($this->pswd);
$this->account->pswd = yii::$app->security->generatePasswordHash($this->pswd);
// Регистрация
return $this->account->save();

View File

@ -12,7 +12,7 @@ use yii;
<button id="profile_button" class="btn pr-0 dropdown-toggle dropdown-toggle-split button_clean" type="button" data-toggle="dropdown" onmouseover="$('#profile_button').dropdown('show')"></button>
<div class="dropdown-menu dropdown-menu-long dropdown-menu-right p-3" aria-labelledby="profile_button" onmouseout="$('#profile_button').dropdown('show')">
<h5 class="mb-3 text-center">Аутентификация</h5>
<?= yii::$app->controller->renderPartial('/account/index') ?>
<?= yii::$app->controller->renderPartial('/account/index', compact('model')) ?>
<!-- <a class="dropdown-item-text text-center px-0 py-2" href="#"><small>Восстановление пароля</small></a> -->
</div>
</div>

View File

@ -40,7 +40,7 @@ use app\models\AccountForm;
</div>
<?= Html::submitButton('Регистрация', ['name' => 'submitRegistration', 'onclick' => 'registration(this.parentElement);', 'class' => 'col-12 ml-auto btn btn-success btn-sm button_clean']) ?>
<? ActiveForm::end(); ?>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>