chuweiqiang 1 anno fa
parent
commit
0ed9110d89
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      application/api/controller/User.php

+ 2 - 2
application/api/controller/User.php

@@ -351,7 +351,7 @@ class User extends Api
 
     public function getUserinfo(){
         $userinfo = $this->auth->getUserinfo();
-        $userinfo['phone_r'] =  preg_match("/^1[3-9]{1}\d{9}$/", $username) ? substr_replace($username, '****', 3, 4);
-        return json($this->auth->getUserinfo());
+        $userinfo['phone_r'] =  substr_replace($userinfo['mobile'], '****', 3, 4);
+        return json($userinfo);
     }
 }