Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mochaaP committed Jul 22, 2023
1 parent bb7cbe3 commit 54ac0f3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions plugins/forum-integration/src/Listener/SynchronizeUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public function synchronize(Events\Event $event)

// 首先同步邮箱
if (
$user->email != $remoteUser->email &&
!empty($user->email) &&
!empty($remoteUser->email)
$user->email != $remoteUser->email
&& !empty($user->email)
&& !empty($remoteUser->email)
) {
if (option('forum_duplicated_prefer') == 'remote') {
$user->email = $remoteUser->email;
Expand All @@ -94,9 +94,9 @@ public function synchronize(Events\Event $event)
$player_name = $player->name;
// 同理,保证两边的用户名、绑定角色名一致。
if (
$player_name != $remoteUser->username &&
!empty($player_name) &&
!empty($remoteUser->username)
$player_name != $remoteUser->username
&& !empty($player_name)
&& !empty($remoteUser->username)
) {
if (option('forum_duplicated_prefer') == 'remote') {
$player_name = $remoteUser->username;
Expand All @@ -114,8 +114,8 @@ public function synchronize(Events\Event $event)
}
// 如果两边用户的密码或 salt 不同,就按照「重复处理」选项的定义来处理。
if (
$user->password != $remoteUser->password ||
(!empty($remoteUser->salt) && $user->salt != $remoteUser->salt)
$user->password != $remoteUser->password
|| (!empty($remoteUser->salt) && $user->salt != $remoteUser->salt)
) {
if (option('forum_duplicated_prefer') == 'remote') {
$user->password = $remoteUser->password;
Expand Down
8 changes: 4 additions & 4 deletions plugins/yggdrasil-api/src/Models/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public function serialize($unsigned = null)
$textures['textures']['SKIN']['metadata'] = ['model' => 'slim'];
}
} elseif (
Schema::hasTable('mojang_verifications') &&
DB::table('mojang_verifications')->where('uuid', $this->uuid)->exists()
Schema::hasTable('mojang_verifications')
&& DB::table('mojang_verifications')->where('uuid', $this->uuid)->exists()
) {
// 如果该角色没有在皮肤站设置皮肤,就从 Mojang 获取。
$skin = $this->fetchProfileFromMojang('SKIN');
Expand All @@ -82,8 +82,8 @@ public function serialize($unsigned = null)
'url' => url("textures/{$this->cape}"),
];
} elseif (
Schema::hasTable('mojang_verifications') &&
DB::table('mojang_verifications')->where('uuid', $this->uuid)->exists()
Schema::hasTable('mojang_verifications')
&& DB::table('mojang_verifications')->where('uuid', $this->uuid)->exists()
) {
// 如果该角色没有在皮肤站设置披风,就从 Mojang 获取。
$cape = $this->fetchProfileFromMojang('CAPE');
Expand Down

0 comments on commit 54ac0f3

Please sign in to comment.