merge cms

parent 3839e0a4
......@@ -2,4 +2,5 @@
return [
'adminEmail' => 'admin@example.com',
'name' => 'Арт Проект',
'user.passwordResetTokenExpire' => 3600,
];
......@@ -54,7 +54,7 @@ class SiteController extends Controller
public function actionLogin()
{
if (!\Yii::$app->user->isGuest)
if (!Yii::$app->user->isGuest)
{
return $this->goHome();
}
......@@ -86,7 +86,7 @@ class SiteController extends Controller
public function actionRecovery()
{
if (!\Yii::$app->user->isGuest)
if (!Yii::$app->user->isGuest)
{
return $this->goHome();
}
......@@ -113,13 +113,15 @@ class SiteController extends Controller
public function actionResetPassword($token)
{
if (!\Yii::$app->user->isGuest)
if (!Yii::$app->user->isGuest)
{
return $this->goHome();
}
$success = false;
$this->page_title = 'Востановление пароля';
$this->layout = "blank";
$success = false;
try {
$model = new ResetPasswordForm($token);
} catch (InvalidParamException $e) {
......
......@@ -45,7 +45,7 @@ class ResetPasswordForm extends Model
public function rules()
{
return [
['password', 'required'],
['password', 'required', 'message' => 'Введите новый пароль'],
['password', 'string', 'min' => 7],
];
}
......
<?php
use yii\db\Migration;
class m160506_095235_fix_user extends Migration
{
public function up()
{
$this->alterColumn('users', 'password_change_code', $this->string(255));
}
public function down()
{
$this->alterColumn('users', 'password_change_code', $this->string(32));
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment