From 9db8a885509a65a0faa7bbe707c7fd71e7a98205 Mon Sep 17 00:00:00 2001 From: weigang Date: Tue, 20 Oct 2020 12:53:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=9C=89=E6=95=88=E6=9C=9F?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/WxLoginService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Service/v3/Implementations/WxLoginService.php b/app/Service/v3/Implementations/WxLoginService.php index 7169e00..43203c2 100644 --- a/app/Service/v3/Implementations/WxLoginService.php +++ b/app/Service/v3/Implementations/WxLoginService.php @@ -42,7 +42,11 @@ class WxLoginService implements \App\Service\v3\Interfaces\WxLoginServiceInterfa $ssdb = ApplicationContext::getContainer()->get(SSDBTask::class); $ssdb->exec('setnx', $hashIds, 1); - $ssdb->exec('expire', $hashIds, config('auth.user.expire_time')); + + $loginExpired = config('auth.user.expire_time'); + if (isset($loginExpired) && $loginExpired) { + $ssdb->exec('expire', $hashIds, $loginExpired); + } $sourceId = CsInfo::query()->where(['user_id' => $user['id']])->value('admin_user_id'); $user['community_source_id'] = $sourceId ?: 0;