Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
5ca64ea3
Commit
5ca64ea3
authored
Oct 16, 2018
by
rlgy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加角色 上一个人的缓存清除
parent
7701f633
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
AdminController.php
backend/controllers/AdminController.php
+2
-0
_form.php
backend/views/admin/_form.php
+13
-11
No files found.
backend/controllers/AdminController.php
View file @
5ca64ea3
...
...
@@ -8,6 +8,7 @@ use Yii;
/**
* 后台用户控制器
*
* @author libingle
*/
class
AdminController
extends
BaseController
...
...
@@ -43,6 +44,7 @@ class AdminController extends BaseController
if
(
Yii
::
$app
->
request
->
isPost
)
{
/* 表单验证 */
$data
=
Yii
::
$app
->
request
->
post
(
'Admin'
);
$data
=
array_map
(
'trim'
,
$data
);
$data
[
'reg_time'
]
=
time
();
$data
[
'reg_ip'
]
=
ip2long
(
Yii
::
$app
->
request
->
getUserIP
());
$data
[
'last_login_time'
]
=
0
;
...
...
backend/views/admin/_form.php
View file @
5ca64ea3
...
...
@@ -14,19 +14,21 @@ use common\core\ActiveForm;
]);
?>
<?=
$form
->
field
(
$model
,
'username'
)
->
iconTextInput
([
'class'
=>
'form-control c-md-2'
,
'iconPos'
=>
'left'
,
'iconClass'
=>
'icon-user'
,
'placeholder'
=>
'登录账号'
,
// 'readonly' =>'readonly',
'class'
=>
'form-control c-md-2'
,
'iconPos'
=>
'left'
,
'iconClass'
=>
'icon-user'
,
'placeholder'
=>
'登录账号'
,
'value'
=>
' '
,
'autocomplete'
=>
'off'
,
])
->
label
(
false
)
?>
<?=
$form
->
field
(
$model
,
'password'
)
->
iconTextInput
([
'type'
=>
'password'
,
'class'
=>
'form-control c-md-2'
,
'iconPos'
=>
'left'
,
'iconClass'
=>
'icon-lock'
,
'placeholder'
=>
'修改时,密码不变可不填'
'type'
=>
'password'
,
'class'
=>
'form-control c-md-2'
,
'iconPos'
=>
'left'
,
'iconClass'
=>
'icon-lock'
,
'value'
=>
''
,
'placeholder'
=>
'修改时,密码不变可不填'
,
'autocomplete'
=>
'off'
,
])
->
label
(
false
)
?>
<input
type=
"hidden"
value=
"
<?=
$role
?>
"
name=
"role"
>
...
...
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