作者 lyh

gx

... ... @@ -153,6 +153,7 @@ class UserLogic extends BaseLogic
if($info['role_id'] == 0) {
//查看当前项目是否有其他的超级管理员
$roleInfo = $this->model->read(['id' => ['!=', $id], 'role_id' => 0]);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($roleInfo, true) . PHP_EOL, FILE_APPEND);
if ($roleInfo === false) {
$this->fail('唯一超级管理员,禁止删除');
}
... ...