mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-08 04:48:10 +08:00
修复用户账号及密码修改的取值问题
This commit is contained in:
parent
a85cdf49d8
commit
f5cced1d7a
@ -79,12 +79,11 @@ class Index extends Controller
|
|||||||
/**
|
/**
|
||||||
* 修改用户资料
|
* 修改用户资料
|
||||||
* @login true
|
* @login true
|
||||||
* @param mixed $id 用户ID
|
|
||||||
*/
|
*/
|
||||||
public function info($id = 0)
|
public function info()
|
||||||
{
|
{
|
||||||
$this->_applyFormToken();
|
$id = $this->request->param('id');
|
||||||
if (AdminService::getUserId() === intval($id)) {
|
if (AdminService::getUserId() == intval($id)) {
|
||||||
SystemUser::mForm('user/form', 'id', [], ['id' => $id]);
|
SystemUser::mForm('user/form', 'id', [], ['id' => $id]);
|
||||||
} else {
|
} else {
|
||||||
$this->error('只能修改自己的资料!');
|
$this->error('只能修改自己的资料!');
|
||||||
@ -116,14 +115,13 @@ class Index extends Controller
|
|||||||
/**
|
/**
|
||||||
* 修改当前用户密码
|
* 修改当前用户密码
|
||||||
* @login true
|
* @login true
|
||||||
* @param mixed $id
|
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
public function pass($id = 0)
|
public function pass()
|
||||||
{
|
{
|
||||||
$this->_applyFormToken();
|
$id = $this->request->param('id');
|
||||||
if (AdminService::getUserId() !== intval($id)) {
|
if (AdminService::getUserId() !== intval($id)) {
|
||||||
$this->error('禁止修改他人密码!');
|
$this->error('禁止修改他人密码!');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user