In beta9 new checks that were added to _ldap_authentication_user_login_authenticate_validate() break integration with email registration module:

  // Email registration module populates name even though user entered email
  if (!empty($form_state['values']['email'])) {
    $entered_name = $form_state['values']['email'];
    $authname_drupal_property = 'mail';
  }

  // $authname is the name the user is authenticated with from the logon form // patch 1599632
  $authname = $entered_name;

  // ISSUE HERE. Email registration module fills ['email'] field, but this code checks 
  // existense of ['mail'] field, that does not exists! So authentication by email address does not work.
  if (empty($form_state['values']['pass']) || empty ($form_state['values'][$authname_drupal_property])) {
    return FALSE;
  }

I resolve this issue temporary for my site:

  // Email registration module populates name even though user entered email
  if (!empty($form_state['values']['email'])) {
    $entered_name = $form_state['values']['email'];
    $authname_drupal_property = 'mail';
    // Manually fill ['mail'] field.
    $form_state['values']['mail'] = $form_state['values']['email'];
  }
CommentFileSizeAuthor
#2 2779945-email-registration.patch1.11 KBlarowlan

Comments

izhilin created an issue. See original summary.

larowlan’s picture

Priority: Major » Normal
Status: Active » Needs review
StatusFileSize
new1.11 KB

  • larowlan committed 7e65a42 on 7.x-2.x
    Issue #2779945 by larowlan: Beta9 breaks integration with email...
larowlan’s picture

Status: Needs review » Fixed

Fixed and rolled a beta 10, thanks for reporting

Status: Fixed » Closed (fixed)

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