Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
46f09d59
Commit
46f09d59
authored
May 06, 2016
by
Олег Гиммельшпах
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge cms
parent
3839e0a4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
5 deletions
+24
-5
backend/config/params.php
backend/config/params.php
+1
-0
backend/controllers/SiteController.php
backend/controllers/SiteController.php
+6
-4
common/models/ResetPasswordForm.php
common/models/ResetPasswordForm.php
+1
-1
common/modules/users/migrations/m160506_095235_fix_user.php
common/modules/users/migrations/m160506_095235_fix_user.php
+16
-0
No files found.
backend/config/params.php
View file @
46f09d59
...
...
@@ -2,4 +2,5 @@
return
[
'adminEmail'
=>
'admin@example.com'
,
'name'
=>
'Арт Проект'
,
'user.passwordResetTokenExpire'
=>
3600
,
];
backend/controllers/SiteController.php
View file @
46f09d59
...
...
@@ -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
)
{
...
...
common/models/ResetPasswordForm.php
View file @
46f09d59
...
...
@@ -45,7 +45,7 @@ class ResetPasswordForm extends Model
public
function
rules
()
{
return
[
[
'password'
,
'required'
],
[
'password'
,
'required'
,
'message'
=>
'Введите новый пароль'
],
[
'password'
,
'string'
,
'min'
=>
7
],
];
}
...
...
common/modules/users/migrations/m160506_095235_fix_user.php
0 → 100644
View file @
46f09d59
<?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
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment