Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking for existing user is ONLY dependent on 'email' in SocialBehavior #939

Open
gdimakop opened this issue Jan 30, 2021 · 1 comment

Comments

@gdimakop
Copy link

gdimakop commented Jan 30, 2021

users/blob/master/src/Model/Behavior/SocialBehavior.php:
Line 138: $existingUser = $this->_table->find('existingForSocialLogin', compact('email'))->first();

Checking for existing user is ONLY dependent on 'email' and get an error when 'email' is excluded from authentication/registration cycle.

config/users.php:
'Email' => ['required' => false, 'validate' => false,]

Error: [InvalidArgumentException] Expression is missing operator (IS, IS NOT) with null value. in ./vendor/cakephp/cakephp/src/Database/Expression/QueryExpression.php on line 784

However, by commenting out line 138 authentication succeeds.

@gdimakop gdimakop changed the title Checking for existing user is dependent ONLY on 'email' in SocialBehavior Checking for existing user is ONLY dependent on 'email' in SocialBehavior Jan 30, 2021
@ajibarra
Copy link
Member

@gdimakop could you please confirm if it still happens in latest version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants