star7th 5 years ago
parent
commit
c2ee2171c2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      server/Application/Api/Controller/UserController.class.php

+ 1 - 1
server/Application/Api/Controller/UserController.class.php

@@ -267,8 +267,8 @@ class UserController extends BaseController {
         $uid = $login_user['uid'] ;
         $username = I("username");
         $field = "username as value" ;
-        $username = \SQLite3::escapeString($username) ;
         if ($username) {
+            $username = \SQLite3::escapeString($username) ;
             $where = " username like '%{$username}%'" ;
         }else{
             $where = ' 1 = 1 ';