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

Issue fork o365-3325774

Command icon 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

codebymikey created an issue. See original summary.

codebymikey’s picture

Title: Allow synchronization against » Allow synchronization against the same local Drupal email account

codebymikey’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new779 bytes

fabianderijk made their first commit to this issue’s fork.

fabianderijk’s picture

Status: Needs review » Fixed

Thanks, this is merged and available in the 2.0.6 release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.