Skip to content

Commit

Permalink
optimized code
Browse files Browse the repository at this point in the history
  • Loading branch information
derek committed Nov 25, 2019
1 parent 011bde1 commit 92e296d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Controller/Admin/SysUserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


use App\Annotation\SysLogAnnotation;
use App\Constants\Constants;
use App\Controller\AbstractController;
use App\Model\Dao\SysUserDao;
use App\Service\Formatter\SysUserFormatter;
Expand Down Expand Up @@ -204,7 +205,7 @@ public function sysUserDelete()
return $this->response->error("提交错误");
}

if (in_array("1", $params)) {
if (in_array(Constants::SYS_ADMIN_ID, $params)) {
return $this->response->error("超级管理员不能删除");
}

Expand Down

0 comments on commit 92e296d

Please sign in to comment.