πŸ‡©πŸ‡ͺGermany @alxn

Account created on 21 September 2022, almost 2 years ago
#

Recent comments

πŸ‡©πŸ‡ͺGermany alxn

I can confirm this fixes the error [error] array_key_exists(): Argument #2 ($array) must be of type array, null given when upgrading drupal/ldap 4.7.0 to 4.8.0, thanks!

πŸ‡©πŸ‡ͺGermany alxn

Thanks for the fixes so far in v4.8, but now in my case an error occurred when upgrading from 4.7 to 4.8 with empty user defined "drupal mappings".

...
- Upgrading drupal/ldap (4.7.0 => 4.8.0): Extracting archive
  - Upgrading drupal/ldap_servers (4.7.0 => 4.8.0)
...
Generating autoload files
55 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
 ----------- ----------- --------------- ------------------------------------- 
  Module      Update ID   Type            Description                          
 ----------- ----------- --------------- ------------------------------------- 
  ldap_user   8408        hook_update_n   8408 - Fix account creation setting  
                                          spelling and Drupal mappings.        
 ----------- ----------- --------------- ------------------------------------- 


 // Do you wish to run the specified pending updates?: yes.                     

>  [notice] Update started: ldap_user_update_8408
>  [error]  array_key_exists(): Argument #2 ($array) must be of type array, null given 
>  [error]  Update failed: ldap_user_update_8408 
 [error]  Update aborted by: ldap_user_update_8408 
 [error]  Finished performing updates. 
πŸ‡©πŸ‡ͺGermany alxn

It might also help to warn if now excluded properties are found in ldap_user.settings config.
We faced an issue with ldap 4.7 where the following old (ldap v4.6) field mappings (field-name, field-mail) from ldap_user.settings config where not visible in the UI under /admin/config/people/ldap/user/drupal
Excerpt from ldap_user.settings

ldapUserSyncMappings:
  drupal:
    field-name:
      ldap_attr: '[samaccountname]'
      user_attr: '[field.name]'
      convert: false
      user_tokens: ''
      config_module: ldap_user
      prov_module: ldap_user
      prov_events:
        - create_drupal_user
        - sync_to_drupal_user
    field-mail:
      ldap_attr: '[mail]'
      user_attr: '[field.mail]'
      convert: false
      user_tokens: ''
      config_module: ldap_user
      prov_module: ldap_user
      prov_events:
        - create_drupal_user
        - sync_to_drupal_user

After saving the form under /admin/config/people/ldap/user/drupal these entries field-name, field-mail were removed from ldap_user.settings config and ultimately the mapping for ldap attribute "mail" was missing, because the "mail_attr" was not set in ldap_servers.server.xyz config. For us the fix was to set the mail_attr in the ldap_servers.server.xyz config.

Production build 0.69.0 2024