ソースを参照

优化 用户注册隐私问题,支持号段1[3-9]

万联科技 4 年 前
コミット
fffad26373
1 ファイル変更1 行追加1 行削除
  1. 1 1
      application/common/library/Auth.php

+ 1 - 1
application/common/library/Auth.php

@@ -156,7 +156,7 @@ class Auth
             'avatar'   => '',
         ];
         $params = array_merge($data, [
-            'nickname'  => $username,
+            'nickname'  => preg_match("/^1[3-9]{1}\d{9}$/",$username) ? substr_replace($username,'****',3,4) : $username,
             'salt'      => Random::alnum(),
             'jointime'  => $time,
             'joinip'    => $ip,