merge cms

parent 3839e0a4
...@@ -2,4 +2,5 @@ ...@@ -2,4 +2,5 @@
return [ return [
'adminEmail' => 'admin@example.com', 'adminEmail' => 'admin@example.com',
'name' => 'Арт Проект', 'name' => 'Арт Проект',
'user.passwordResetTokenExpire' => 3600,
]; ];
...@@ -54,7 +54,7 @@ class SiteController extends Controller ...@@ -54,7 +54,7 @@ class SiteController extends Controller
public function actionLogin() public function actionLogin()
{ {
if (!\Yii::$app->user->isGuest) if (!Yii::$app->user->isGuest)
{ {
return $this->goHome(); return $this->goHome();
} }
...@@ -86,7 +86,7 @@ class SiteController extends Controller ...@@ -86,7 +86,7 @@ class SiteController extends Controller
public function actionRecovery() public function actionRecovery()
{ {
if (!\Yii::$app->user->isGuest) if (!Yii::$app->user->isGuest)
{ {
return $this->goHome(); return $this->goHome();
} }
...@@ -113,13 +113,15 @@ class SiteController extends Controller ...@@ -113,13 +113,15 @@ class SiteController extends Controller
public function actionResetPassword($token) public function actionResetPassword($token)
{ {
if (!\Yii::$app->user->isGuest) if (!Yii::$app->user->isGuest)
{ {
return $this->goHome(); return $this->goHome();
} }
$success = false; $this->page_title = 'Востановление пароля';
$this->layout = "blank";
$success = false;
try { try {
$model = new ResetPasswordForm($token); $model = new ResetPasswordForm($token);
} catch (InvalidParamException $e) { } catch (InvalidParamException $e) {
......
...@@ -45,7 +45,7 @@ class ResetPasswordForm extends Model ...@@ -45,7 +45,7 @@ class ResetPasswordForm extends Model
public function rules() public function rules()
{ {
return [ return [
['password', 'required'], ['password', 'required', 'message' => 'Введите новый пароль'],
['password', 'string', 'min' => 7], ['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