Allow synchronization against the same local Drupal email account

Created on 7 December 2022, over 2 years ago
Updated 19 January 2023, about 2 years ago

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

User interface changes

N/A

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024