From 3e2f80e648e16eaf863af42b92353c48cf0684e4 Mon Sep 17 00:00:00 2001 From: winzer Date: Sat, 13 Feb 2021 19:14:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E6=9C=BA=E5=88=B6=E9=98=B6?= =?UTF-8?q?=E6=AE=B5=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/Auth/Api.php | 5 +++++ app/Services/Auth/Home.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/app/Services/Auth/Api.php b/app/Services/Auth/Api.php index e1cf4a2c..3a35d09c 100644 --- a/app/Services/Auth/Api.php +++ b/app/Services/Auth/Api.php @@ -17,6 +17,11 @@ class Api extends AuthService { $token = $this->generateToken($user->id); + /** + * demo版本不限制多人登录 + */ + // $this->logoutOtherClients($user->id); + $this->logoutOtherClients($user->id); $this->createUserToken($user->id, $token); diff --git a/app/Services/Auth/Home.php b/app/Services/Auth/Home.php index 6cafc47d..9b885b5d 100644 --- a/app/Services/Auth/Home.php +++ b/app/Services/Auth/Home.php @@ -17,6 +17,11 @@ class Home extends AuthService { $sessionId = $this->session->getId(); + /** + * demo版本不限制多人登录 + */ + // $this->logoutOtherClients($user->id); + $this->logoutOtherClients($user->id); $this->createUserSession($user->id, $sessionId);