Skip to content

Commit

Permalink
fix github (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangguangwuwu committed Sep 17, 2022
1 parent aba1f52 commit 321faa2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions public/themes/admin_simpleboot3/admin/user/add.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="hidden" name="__token__" value="{:token()}" />
<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions public/themes/admin_simpleboot3/admin/user/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="hidden" name="id" value="{$id}" />
<input type="hidden" name="__token__" value="{:token()}" />
<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function addPost()
$roleIds = $this->request->param('role_id/a');
if (!empty($roleIds) && is_array($roleIds)) {
$data = $this->request->param();
$result = $this->validate($data, 'User');
$result = $this->validate($data, 'User.add');
if ($result !== true) {
$this->error($result);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class UserValidate extends Validate
{
protected $rule = [
'user_login' => 'require|unique:user,user_login',
'user_login' => 'require|unique:user,user_login|token',
'user_pass' => 'require',
'user_email' => 'require|email|unique:user,user_email',
];
Expand Down

0 comments on commit 321faa2

Please sign in to comment.