I'm having trouble getting user provisioning to work from LDAP -> Drupal using Drupal 8 and the March 11 8.x-3.x-dev tarball. (I haven't gotten any 8.x version to work, but thought the most recent available would be best to test with.)

LDAP server queries for the test user appear to work fine using admin/config/people/ldap/server/ldap_uvm_edu/test.

I can configure ldap_users "Basic Provisioning to Drupal Account Settings" to provision a new Drupal user from LDAP entries. I have both " Create or Sync to Drupal user on successful authentication with LDAP credentials. (Requires LDAP Authentication module)." and " Create or Sync to Drupal user anytime a Drupal user account is created or updated. Requires a server with binding method of "Service Account Bind" or "Anonymous Bind"." set.

For mappings I've got [cn] -> Field:Name and [mail] -> Field:Email.

When I try "Test LDAP functionality for a given user", "Execute Action", " On create or sync to Drupal user when successfully authenticated with LDAP credentials. (Requires LDAP Authentication module)." I get "unexpected error".

Here's the top of the stack trace from apache error_log:

[Tue Mar 14 12:33:54 2017] [warn] [client 132.198.100.89] mod_fcgid: stderr: Error: Call to a member function getEmail() on array in /users/j/t/jtl/dr8.jtl.w3.uvm.edu-root/modules/ldap/ldap_user/src/Processor/DrupalUserProcessor.php on line 235 #0 /users/j/t/jtl/dr8.jtl.w3.uvm.edu-root/modules/ldap/ldap_user/src/Processor/DrupalUserProcessor.php(371): Drupal\\ldap_user\\Processor\\DrupalUserProcessor->applyAttributesToAccount(true, Array, Object(Drupal\\ldap_servers\\Entity\\Server), 1, Array), referer: http://dr8.jtl.w3.uvm.edu/admin/config/people/ldap/user/test
[Tue Mar 14 12:33:54 2017] [warn] [client 132.198.100.89] mod_fcgid: stderr: #1 /users/j/t/jtl/dr8.jtl.w3.uvm.edu-root/modules/ldap/ldap_user/src/Form/LdapUserTestForm.php(192): Drupal\\ldap_user\\Processor\\DrupalUserProcessor->syncToDrupalAccount(Array, 2, true), referer: http://dr8.jtl.w3.uvm.edu/admin/config/people/ldap/user/test
[Tue Mar 14 12:33:54 2017] [warn] [client 132.198.100.89] mod_fcgid: stderr: #2 [internal function]: Drupal\\ldap_user\\Form\\LdapUserTestForm->submitForm(Array, Object(Drupal\\Core\\Form\\FormState)), referer: http://dr8.jtl.w3.uvm.edu/admin/config/people/ldap/user/test

I'll attach more of the error_log as well as yml and LDAP query output.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jtlatuvm created an issue. See original summary.

jtlatuvm’s picture

Title: LDAP Users: » LDAP Users: can't provision Drupal user from LDAP
jtlatuvm’s picture

FileSize
8.71 KB

Forgot to upload the error_log.

grahl’s picture

Assigned: Unassigned » grahl
grahl’s picture

Hi

Thanks for the detailed bug report, the current DEV is the best thing to use. I'll try to reproduce the issue you see. This might be a UX issue since the combination you entered might not ever make sense if you don't have a valid ldap_authentication configuration.

FYI: the per-action test page is often less ideal than the server test page under /admin/config/people/ldap/server/your_server/test. Could you please try that one and see if you can get your site set up that way?

grahl’s picture

Status: Active » Fixed

Hi

The current DEV should make it so that you cannot trigger that anymore. Additionally, I've relabeled that test form to more clearly indicate usage and potential dangers.

Status: Fixed » Closed (fixed)

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