I am running Drupal 8.1.1 on IIS 10 PHP 7.0.5 LDAP Module 8.x-3.x-dev Released: 2016-May-10

When i attempt to login using the ldap account i get this errors and the account does not get created (errors in the order they are logged):

Notice: Undefined property: Drupal\externalauth\ExternalAuth::$uid in ldap_user_get_uid_from_map() (line 577 of C:\inetpub\wwwroot\venus\modules\ldap\ldap_user\ldap_user.module).
Notice: Undefined index: userprincipalname in LdapUserConf->provisionDrupalAccount() (line 1104 of C:\inetpub\wwwroot\venus\modules\ldap\ldap_user\LdapUserConf.class.php).
Drupal\Core\Database\InvalidQueryException: Query condition 'users_field_data.mail IN ()' cannot be empty. in Drupal\Core\Database\Query\Condition->condition() (line 71 of C:\inetpub\wwwroot\venus\core\lib\Drupal\Core\Database\Query\Condition.php).

Comments

wolfhowling created an issue. See original summary.

wolfhowling’s picture

Update:

when i change userprincipalname to mail then the users can login, the diference in the domain server is capitalization in the mail attribute:

userprincipalname : firstname.lastname@domain.com (does not work)

mail : Firstname.Lastname@domain.com (it works)

  • queenvictoria committed 36b78d3 on 8.x-3.x
    #2724463 Catch some errors if there isn't an existing external auth row.
    
  • queenvictoria committed c46bf5c on 8.x-3.x
    Issue #2724463 by queenvictoria: Querying with an empty email address...
queenvictoria’s picture

Status: Active » Fixed

I've fixed and error and caught some warnings. Thanks for the bug report!

The case insensitivity you could achieve with "PHP to transform Drupal login username to LDAP UserName attribute" on the server settings page. I'm not sure that it's wired up yet. But that would be the place to do it rather than making the module case-insensitive.

Status: Fixed » Closed (fixed)

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