Hi,

I'm hugely benefitted by the module in Drupal 7. Thanks for all your hard work and for the contributions to the Drupal community.

I'm in the process of installing in Drupal 8. I've installed LDAP version 8.x-3.0-alpha3. My site set up details are: Drupal version : 8.2.3 and PHP: php5.6. I've successfully installed the module.

But I've noticed a small change in Drupal 8. There's a password checkbox to disable password fields while creating user accounts in Drupal 7. But it's not in Drupal 8. Is it only in Drupal7?

The password checkbox is on the page admin/config/people/ldap/user under the section Drupal Account Provisioning Events

'Disable the password fields at /admin/create/people since the password is going to be randomly generated anyway. This is useful if you are synching data to Drupal from LDAP, and not bringing the user password from LDAP.'

There're no issues in testing a user with LDAP or creating a new user or logging in using LDAP. Unlike Drupal 7, I need to enter some password while creating a new user (admin/people/create). However the password field is removed once the user is logged in.

Does the above behaviour normal in Drupal 8?

Thanks,

Comments

chandraraj created an issue. See original summary.

grahl’s picture

Assigned: Unassigned » grahl

Will review next week

grahl’s picture

Title: Password checkbox » Support disableAdminPasswordField in 8.x
Assigned: grahl » Unassigned
Category: Support request » Feature request
Priority: Normal » Minor
StatusFileSize
new1.02 KB

Huh, interesting, that's not in the 8 code base at all, though that should have been in the branch looking at the dates here https://www.drupal.org/node/2033195 Though that's actually in the wrong section in the 7 form, weird.

Anyway, from my perspective adding that checkbox is not an ideal solution since there are essentially three cases which can come up:
- Create a user without LDAP assocation => Needs password
- Create a user with LDAP association (existing LDAP user) => Normally does not require a password though I suppose one could authenticate with Drupal and then sync data over LDAP (ignoring that case for now)
- Create a user with LDAP association (create LDAP user) => Password required

So from my perspective the password field would need to dynamically switch if the radio button is associate and create is deselected. I tried to put that into FormAPI states but something is weird there with the syntax and Google suggests that I'm not the first with problems.

I'd appreciate if someone could help work on this patch or offer feedback if this would require custom JS not supported by states.

chandraraj’s picture

Issue summary: View changes
grahl’s picture

Issue tags: +Novice
grahl’s picture

Status: Active » Needs review
StatusFileSize
new4.24 KB
grahl’s picture

Assigned: Unassigned » grahl
chandraraj’s picture

Hi @grahl,

Thanks for the patch, but sorry for the delay in testing the patch. I've tested it and it seems to be working well.

  • grahl committed 5bd476d on 8.x-3.x
    Issue #2849114 by grahl, chandraraj: Support disableAdminPasswordField...
grahl’s picture

Status: Needs review » Fixed
grahl’s picture

Title: Support disableAdminPasswordField in 8.x » Make password field flexible in terms of associated users (mixed/exclusive)
Status: Fixed » Needs work

Reopening since the conditions on the edit form listed above aren't fully supported yet but disabling the password field in the registration form is added.

grahl’s picture

Status: Needs work » Postponed
grahl’s picture

Assigned: grahl » Unassigned
grahl’s picture

Version: 8.x-3.x-dev » 8.x-4.x-dev