Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Although the schema is set up the module doesn't store LDAP data in the user object. There are several reasons for this.
- The function responsible for this (userconf->ldapAssociateDrupalAccount) isn't called as the submit handler (ldap_user_form_register_form_submit2) isn't added properly.
- 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.
- 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).
Comment | File | Size | Author |
---|
Comments
Comment #2
queenvictoria CreditAttribution: queenvictoria at Holly commentedHey 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.
Comment #3
queenvictoria CreditAttribution: queenvictoria at Holly commentedAdditionally 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).
Comment #4
queenvictoria CreditAttribution: queenvictoria at Holly commentedWe 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
Comment #5
larowlanWorking on this
Comment #6
queenvictoria CreditAttribution: queenvictoria at Holly commentedI've pushed up the change in this diff as discussed.
Comment #8
larowlan