Active
Project:
Lightweight Directory Access Protocol
Version:
8.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Jun 2017 at 15:09 UTC
Updated:
9 Apr 2024 at 15:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
grahlWe're waiting on the port of sharedemail.
Comment #3
grahlComment #4
grahlComment #5
baikho commented@grahl, D8 Port is done. Let me know if you experience any issues
Comment #6
baikho commentedComment #7
boromino commentedComment #8
dravenkComment #9
dravenkComment #10
grahlThanks everyone for their work on this.
I don't feel comfortable adding this in, knowing how complex the interaction with email can be in all setup variants and what potential side-effects this could introduce.
Ideally this would be a separate module but at the moment the two cases in LoginValidator and DrupalUserProcessor could probably be fixed more easily for users of the sharedemail module by a simpler patch just changing those lines.
If someone wanted to try going the separate module route I'd be happy to commit a patch to ldap which provides an appropriate alter hook to allow changing the behavior of conflict resolution, but I'd like to avoid coupling ldap directly to sharedemail (which is a module one should avoid using with Drupal, from my perspective).
Comment #11
luongosb commentedI'd be willing to write something if you made the hook available.
Comment #12
grahlThanks for the initiative vetchneons, could you maybe also write a quick patch for the necessary hooks and add it here? I don't have much time at the moment for ldap.
Comment #13
boromino commentedIs there any progress on this? I need the feature and would be willing to create a module. @vetchneons Did you already start? Can we join forces?
Comment #15
boromino commentedI have added a hook to alter $account_with_same_email. I have also created a module ldap_sharedemail. I will publish the module as soon as the hook is available in the ldap module.
Comment #16
grahlHi boromino
Thanks for the MR. Could you take a look at the two following things?
Comment #19
boromino commentedI have added documentation in ldap_user.api.php with similar name to other hooks.
I had added $account_with_same_email instanceof UserInterface check, because $account_with_same_email was passed as reference to the hook. Hence a hook implementation could set it to anything other than false and UserInterface. However I have now opted for a different approach in order to be consistent on the return value and on the value to be passed to the hook implementations.
Comment #21
bluegeek9 commentedThere are two other issues related to non-unique emails. I will use this issue as the parent, it is the oldest.
#3279539: Duplicate email addresses during LDAP sync cause GroupUserUpdateProcessor to abort
#3304327: Fix LDAP Query does not continue all users if the user already exists in the system with the same email address