users icon indicating copy to clipboard operation
users copied to clipboard

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

Open gdimakop opened this issue 4 years ago • 1 comments

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 avatar Jan 30 '21 12:01 gdimakop