From 366e99dd940a6f7ed3da2e3fd7e76b59f63c1f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florencio=20Hern=C3=A1ndez?= Date: Thu, 1 Aug 2024 12:08:29 +0100 Subject: [PATCH 1/2] Bug #1084 Fix issue with avatar images long URL --- ...ChangeAvatarColumnTypeInSocialAccounts.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 config/Migrations/20240801112143_ChangeAvatarColumnTypeInSocialAccounts.php diff --git a/config/Migrations/20240801112143_ChangeAvatarColumnTypeInSocialAccounts.php b/config/Migrations/20240801112143_ChangeAvatarColumnTypeInSocialAccounts.php new file mode 100644 index 000000000..0fb638b81 --- /dev/null +++ b/config/Migrations/20240801112143_ChangeAvatarColumnTypeInSocialAccounts.php @@ -0,0 +1,24 @@ +table('social_accounts'); + $table->changeColumn('avatar', 'text', [ + 'default' => null, + 'null' => true, + ]); + $table->update(); + } +} From 8bf6adbd0b23af8cd53b6e4f2f0f2a828b76cee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florencio=20Hern=C3=A1ndez?= Date: Fri, 2 Aug 2024 10:23:50 +0100 Subject: [PATCH 2/2] Fix pipeline issue with findExistingForSocialLogin from SocialBehavior --- src/Model/Behavior/SocialBehavior.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Model/Behavior/SocialBehavior.php b/src/Model/Behavior/SocialBehavior.php index 763be8c91..e1b345624 100644 --- a/src/Model/Behavior/SocialBehavior.php +++ b/src/Model/Behavior/SocialBehavior.php @@ -278,8 +278,13 @@ public function generateUniqueUsername($username) */ public function findExistingForSocialLogin(\Cake\ORM\Query $query, array $options) { + $email = $options['email'] ?? null; + if (!$email) { + return $query->where('1 != 1'); + } + return $query->where([ - $this->_table->aliasField('email') => $options['email'], + $this->_table->aliasField('email') => $email, ]); }