Fix LDAP Query does not continue all users if the user already exists in the system with the same email address

Created on 17 August 2022, over 2 years ago
Updated 7 January 2024, 11 months ago

Problem/Motivation

LDAP Query does not continue all users if the user already exists in the system with the same email address

Steps to reproduce

- Create a user with an email and user name that exists in LDAP System.
- Install and config LDAP module and config
Existing Drupal User Account Conflict to be "Associate Drupal account with the LDAP entry. This option is useful for creating accounts and assigning roles before an LDAP user authenticates."
- Config LDAP Query
- Run the Cron
- Query stopped because "Another user already exists in the system with the same email address."

Proposed resolution

Update the user if has same email and user name to sync with LDAP.

πŸ› Bug report
Status

RTBC

Version

4.3

Component

Tests

Created by

πŸ‡―πŸ‡΄Jordan Qusai Taha Amman

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.

  • Issue was unassigned.
  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9
  • Status changed to Active 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9
  • πŸ‡―πŸ‡΄Jordan hamzadwaya

    In my situation, the patch wasn't working effectively when a user logged in and another user had the same email but a different username. I discovered that the patch was checking if the logged-in user had the same username, which always triggered the error message: 'Another user already exists in the system with the same email address. You should contact the system administrator to resolve this conflict.'

    To resolve this, I modified the code to remove the username check, tested it, and found that it works fine

Production build 0.71.5 2024