禁用用户bug修复

This commit is contained in:
hdm 2022-06-24 10:09:28 +08:00
parent decf9bd556
commit 4f07c047b8

View File

@ -99,10 +99,10 @@ class User extends BaseController
$data['update_time'] = time(); $data['update_time'] = time();
$data['id'] = $id; $data['id'] = $id;
if (Db::name('User')->update($data) !== false) { if (Db::name('User')->update($data) !== false) {
if ($param['status'] == 0) { if ($data['status'] == 0) {
add_log('disable', $param['id'], $param); add_log('disable', $id, $data);
} else if ($param['status'] == 1) { } else if ($data['status'] == 1) {
add_log('recovery', $param['id'], $param); add_log('recovery', $id, $data);
} }
return to_assign(); return to_assign();
} else { } else {