From b50b8c47671b028888bdc9eddca40ab444592454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E8=81=94=E7=A7=91=E6=8A=80?= Date: Sun, 27 Sep 2020 14:32:33 +0800 Subject: [PATCH] =?UTF-8?q?update=20application/common/library/Auth.php.?= =?UTF-8?q?=20API=20=E6=89=8B=E6=9C=BA=E6=B3=A8=E5=86=8C=EF=BC=8C=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E5=B0=86=E7=94=A8=E6=88=B7=E5=90=8D=E5=86=99=E5=85=A5?= =?UTF-8?q?=E6=98=B5=E7=A7=B0=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E6=9A=B4=E9=9C=B2=E5=9C=A8=E5=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当用户名为手机号时 隐藏中间四位 --- application/common/library/Auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/common/library/Auth.php b/application/common/library/Auth.php index caca32e8e..610eb3868 100644 --- a/application/common/library/Auth.php +++ b/application/common/library/Auth.php @@ -156,7 +156,7 @@ class Auth 'avatar' => '', ]; $params = array_merge($data, [ - 'nickname' => $username, + 'nickname' => preg_match("/^1[34578]{1}\d{9}$/",$username) ? substr_replace($username,'****',3,4) : $username, 'salt' => Random::alnum(), 'jointime' => $time, 'joinip' => $ip, -- Gitee