We are using simple_ldap in our environment and syncing email addresses to Drupal.

The particular use case that was causing us issues was when an email address was changed in LDAP, email_confirm was still trying to request an email confirmation.

This small patch adds support for the simple_ldap module and skips email confirmation (thus allowing simple_ldap to update the user record with what is already stored in LDAP).

CommentFileSizeAuthor
#1 email_confirm_simple_ldap-2316885-1.patch1.05 KBdjac

Comments

djac’s picture

Status: Active » Needs review
StatusFileSize
new1.05 KB
purushotam.rai’s picture

I feel we should make it more generic not just LDAP, we definitely need a workaround on this.

ludo.r’s picture

I think the module should indeed ask other modules wether the email change should be handled or not.
By implementing a new hook.

Alternatively, you can add following value in the edit array, using hook_form_alter() or hook_user_presave() (this one should be fired before the email_confirrm_user_presave()):

$edit['email_confirmed'] = TRUE;

If this value is set to TRUE, email_confirrm_user_presave() won't do anything.
This is the approach I just did.

But email_confirm module should defintely implement a specific hook.