diff --git a/plugins/authme-integration/package.json b/plugins/authme-integration/package.json index cc8e3c9c..ccfb1eb4 100644 --- a/plugins/authme-integration/package.json +++ b/plugins/authme-integration/package.json @@ -1,6 +1,6 @@ { "name": "authme-integration", - "version": "2.4.2", + "version": "2.4.3", "title": "Authme 数据对接", "description": "与 Authme 进行数据对接,让玩家可以使用皮肤站的账号密码登录游戏。", "author": "printempw", diff --git a/plugins/authme-integration/src/Listener/SyncWithAuthme.php b/plugins/authme-integration/src/Listener/SyncWithAuthme.php index ea952c0f..42285ccd 100644 --- a/plugins/authme-integration/src/Listener/SyncWithAuthme.php +++ b/plugins/authme-integration/src/Listener/SyncWithAuthme.php @@ -13,10 +13,12 @@ class SyncWithAuthme public function subscribe(Dispatcher $events) { // 初始化在 Authme 那边注册的用户 - User::where('realname', '<>', '') + User::where(function ($query) { + return $query->whereNotNull('realname')->orWhere('realname', '<>', ''); + }) ->join('players', 'users.uid', 'players.uid') ->groupBy('players.uid') - ->havingRaw('COUNT(pid) <> 0') + ->havingRaw('COUNT(pid) = 0') ->select('users.*') ->get() ->each(function ($user) {