Browse Source

Merge branch 'master' into v2.7.1

star7th 5 years ago
parent
commit
9c34ce9d93
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 ';