Although the schema is set up the module doesn't store LDAP data in the user object. There are several reasons for this.

  1. The function responsible for this (userconf->ldapAssociateDrupalAccount) isn't called as the submit handler (ldap_user_form_register_form_submit2) isn't added properly.
  2. If "Associate manually created Drupal accounts with related LDAP Account if one exists" is checked in LDAP User settings the submit handler ignores that option. This is probably the case in Drupal 7 too.
  3. The function responsible (ldapAssociateDrupalAccount) hadn't been rewritten for Drupal 8.

This had never been wired up. I discovered it while attempting to port https://security.drupal.org/node/148783 to 8.x-3.x. As it turns out the port isn't necessary because in 8 we simply don't display the fields on the form (or in the view) in the form definition (in ldap_user.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

queenvictoria created an issue. See original summary.

queenvictoria’s picture

Assigned: queenvictoria » larowlan
Status: Active » Needs review
FileSize
8.75 KB

Hey so @larowlan. When I am doing new work on -dev do I create an issue like this and create a patch, wait for review &c., or just commit work? IE I just committed and pushed a one line fix previous to this but now am creating an issue and adding a patch.

queenvictoria’s picture

Additionally for this ticket I should probably migrate the validate handler too and check the other cases where ldapAssociateDrupalAccount is called (when the checkbox is added to the register form for example or when provision LDAP is called).

queenvictoria’s picture

We need to respect the password/email hide checkbox and then modify the widget for email and password.

@larowlan says
* Manage form display in UI
* After that a hook like Hook entity build form display alter

larowlan’s picture

Working on this

queenvictoria’s picture

I've pushed up the change in this diff as discussed.

larowlan’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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