diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index 93a39854c..ab61b88a2 100755 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -607,7 +607,7 @@ class UsersController extends AbstractController $oldTime = strtotime($res->created_at); $time = time(); //24个小时失效 - if (abs($time - $oldTime) > 600) { + if (abs($time - $oldTime) > 86400) { return Base::retError("链接已失效,请重新登录/注册"); } UserEmailVerification::where('code', $data['code']) diff --git a/app/Models/UserEmailVerification.php b/app/Models/UserEmailVerification.php index 3f421b3de..fdb71063a 100644 --- a/app/Models/UserEmailVerification.php +++ b/app/Models/UserEmailVerification.php @@ -42,7 +42,7 @@ class UserEmailVerification extends AbstractModel */ public static function userEmailSend(User $user) { - $res = self::where('userid', $user->userid)->where('created_at', '>', Carbon::now()->subMinutes(10))->first(); + $res = self::where('userid', $user->userid)->where('created_at', '>', Carbon::now()->subMinutes(1440))->first(); if ($res) return; //删除 self::where('userid', $user->userid)->delete();