浏览代码

!242 优化 用户注册隐私问题,支持号段1[3-9]
Merge pull request !242 from 前海万联/N/A

Karson 5 年之前
父节点
当前提交
7b0ce82bbb
共有 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,