Skip to content

Commit

Permalink
Fix pipeline issue with findExistingForSocialLogin from SocialBehavior
Browse files Browse the repository at this point in the history
  • Loading branch information
flohdez committed Aug 2, 2024
1 parent 366e99d commit 8bf6adb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Model/Behavior/SocialBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
}

Expand Down

0 comments on commit 8bf6adb

Please sign in to comment.