From 8d7f5f5d66eca8201feb91307710b73e721bcd7a Mon Sep 17 00:00:00 2001 From: wangyuting Date: Fri, 11 Aug 2023 10:32:25 +0800 Subject: [PATCH] * Fix search is null bug. --- module/user/control.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/user/control.php b/module/user/control.php index 8bde992c9c..551037b2d5 100755 --- a/module/user/control.php +++ b/module/user/control.php @@ -1390,11 +1390,10 @@ class user extends control $limit = $this->get->limit; $index = 0; $newUsers = array(); - //if(empty($search)) return array(); foreach($users as $account => $realname) { if($index >= $limit) break; - if(stripos($account, $search) === false and stripos($realname, $search) === false) continue; + if($search && stripos($account, $search) === false and stripos($realname, $search) === false) continue; $index ++; $newUsers[$account] = $realname; }