Skip to content

Commit

Permalink
[authme-integration] fix wrong SQL operator
Browse files Browse the repository at this point in the history
fix #53, fix #89, fix #94
  • Loading branch information
g-plane committed Mar 1, 2021
1 parent 0728387 commit e0f230a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/authme-integration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "authme-integration",
"version": "2.4.2",
"version": "2.4.3",
"title": "Authme 数据对接",
"description": "与 Authme 进行数据对接,让玩家可以使用皮肤站的账号密码登录游戏。",
"author": "printempw",
Expand Down
6 changes: 4 additions & 2 deletions plugins/authme-integration/src/Listener/SyncWithAuthme.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e0f230a

Please sign in to comment.