wesmiler 3 недель назад
Родитель
Сommit
f2f04e757b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/Services/Common/UserService.php

+ 1 - 1
app/Services/Common/UserService.php

@@ -306,7 +306,7 @@ class UserService extends BaseService
         }
 
         // 重置密码为:123456
-        $newPassword = '123456';
+        $newPassword = $user->mobile?substr($user->mobile,-6,6):'123456';
         // 密码加密:密码 + 用户名(与登录验证保持一致)
         $user->password = get_password($newPassword . $user->username);
         $user->save();