mirror of
https://github.com/lsky-org/lsky-pro.git
synced 2025-01-08 11:57:52 +08:00
up
This commit is contained in:
parent
5483e64656
commit
7cac023bc8
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@
|
||||
.idea
|
||||
|
||||
runtime
|
||||
/config/db.php
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
@ -122,10 +122,13 @@ class Users extends Base
|
||||
if (!$user = UserModel::get($id)) {
|
||||
return $this->error('数据获取失败');
|
||||
}
|
||||
if ($user->id === $this->user->id) {
|
||||
return $this->error('不可修改自己的状态');
|
||||
}
|
||||
if (!$user->where('id', $id)->setField('state', $state)) {
|
||||
return $this->error('状态修改失败');
|
||||
}
|
||||
return $this->success('状态修改成功');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user