mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
perf: 修改验证邮件有效期为10分钟方便测试(验证完后改为24小时)
This commit is contained in:
parent
0aa18ded72
commit
923549bb5e
@ -607,7 +607,7 @@ class UsersController extends AbstractController
|
|||||||
$oldTime = strtotime($res->created_at);
|
$oldTime = strtotime($res->created_at);
|
||||||
$time = time();
|
$time = time();
|
||||||
//24个小时失效
|
//24个小时失效
|
||||||
if (abs($time - $oldTime) > 86400) {
|
if (abs($time - $oldTime) > 600) {
|
||||||
return Base::retError("链接已失效,请重新登录/注册");
|
return Base::retError("链接已失效,请重新登录/注册");
|
||||||
}
|
}
|
||||||
UserEmailVerification::where('code', $data['code'])
|
UserEmailVerification::where('code', $data['code'])
|
||||||
|
|||||||
@ -42,7 +42,7 @@ class UserEmailVerification extends AbstractModel
|
|||||||
*/
|
*/
|
||||||
public static function userEmailSend(User $user)
|
public static function userEmailSend(User $user)
|
||||||
{
|
{
|
||||||
$res = self::where('userid', $user->userid)->where('created_at', '>', Carbon::now()->subMinutes(1440))->first();
|
$res = self::where('userid', $user->userid)->where('created_at', '>', Carbon::now()->subMinutes(10))->first();
|
||||||
if ($res) return;
|
if ($res) return;
|
||||||
//删除
|
//删除
|
||||||
self::where('userid', $user->userid)->delete();
|
self::where('userid', $user->userid)->delete();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user