Profile Fields Not Syncing

Created on 3 March 2025, 11 days ago

Problem/Motivation

We have encountered an issue on our Open Social installation where profile fields are no longer syncing. The "syncProfileFields" event seems to no longer execute, as I added some debugging to the event and saw no output.

The mapping itself appears to work.
When I add following code directly into the DrupalUserProcessor of the LDAP module, the fields sync correctly. (On a clean Drupal installation, I had to manually fill a field first to create the profile entity for the user, so I believe I may be missing a setting here, that creates the profile on registration)

DrupalUserProcessor.php Line 842

if ($value_type === 'profile') {
        $profiles = $this->account->get('my_profile_profiles')->referencedEntities();
        foreach ($profiles as $profile) {
          $profile->set($value_name, $value === '' ? NULL : $value);
          $profile->save();
        }
      }

Steps to Reproduce

  1. Set up a new Drupal 10 installation.
  2. Install the latest versions of the following modules:
  3. Configure your LDAP test server.
  4. Create a new profile type. e.g my_profile
  5. Add fields (e.g., first and last name) to the profile.
  6. Grant profile permissions to the authenticated user role.
  7. Map the fields with your LDAP tokens.
  8. Log in with a user.
🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany Corn696 Flensburg

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024