From 4215e189e98254c3f62738a2b10c36e2d538d1d8 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 29 Nov 2019 11:27:50 +0800 Subject: [PATCH] Update User.php --- app/admin/controller/User.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/admin/controller/User.php b/app/admin/controller/User.php index 14f623b34..6a0155541 100644 --- a/app/admin/controller/User.php +++ b/app/admin/controller/User.php @@ -111,8 +111,7 @@ class User extends Controller // 用户权限处理 $data['authorize'] = (isset($data['authorize']) && is_array($data['authorize'])) ? join(',', $data['authorize']) : ''; // 用户账号重复检查 - if (isset($data['id'])) - unset($data['username']); + if (isset($data['id'])) unset($data['username']); elseif ($this->app->db->name($this->table)->where(['username' => $data['username'], 'is_deleted' => '0'])->count() > 0) { $this->error("账号{$data['username']}已经存在,请使用其它账号!"); }