Problem/Motivation
If a normal Drupal user exists, a o365 login should merge against the existing user with the same email address.
This issue has been addressed in the 3.0.x branch, but is still active in 2.0.5.
Steps to reproduce
Create a local Drupal user with a specific email, attempt to login using o365 against a user with the same email will cause a duplicate account to be created with the same email (leaving the database in an inconsistent state) or the following exception will be thrown if they happen to use their email as their username:
Drupal\externalauth\Exception\ExternalAuthRegisterException: User could not be registered. There is already an account with username "first.lastname@example.com" in Drupal\externalauth\ExternalAuth->register()
Proposed resolution
Address the if condition to check the email when the o365 account doesn't exist.
Remaining tasks
Provide issue fork/patch.
User interface changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3325774-o365-sync-existing-accounts-4.diff | 779 bytes | codebymikey |
Issue fork o365-3325774
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
codebymikey commentedComment #4
codebymikey commentedComment #7
fabianderijkThanks, this is merged and available in the 2.0.6 release.