Browse Source

Update PasswordController.php

iamsaltedfish 4 years ago
parent
commit
fa3233dcaa
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/Controllers/PasswordController.php

+ 4 - 1
src/Controllers/PasswordController.php

@@ -125,7 +125,10 @@ class PasswordController extends BaseController
         } else {
         } else {
             $rs['ret'] = 1;
             $rs['ret'] = 1;
             $rs['msg'] = '重置成功';
             $rs['msg'] = '重置成功';
-            $user->clean_link();
+            
+            if ($_ENV['enable_forced_replacement'] == true) {
+                $user->clean_link();
+            }
 
 
             // 禁止链接多次使用
             // 禁止链接多次使用
             $token->expire_time = time();
             $token->expire_time = time();