Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Every few weeks the admin imports a csv file with users into the site. Existing users are updated, new users are created. The csv also holds passwords. For new users the password needs to be set to value form the csv, for existing users I want to keep the password in Drupal.
Can I make a Feeds Tamper rule where the password value is set on new users and skipped on existing users?
Comments
Comment #2
HansKuiters CreditAttribution: HansKuiters commentedNo Feeds Tamper solution. I believe Feeds Tamper only works on the source and has no clue about the target. Correct me if I'm wrong.
But I made it work with this hook in my custom module.
The $entity object holds the new values from $source at this stage. By unsetting $entity->pass the current pass doesn't get updated.
Maybe quick and dirty but it works for me. I am interested in other solutions.
Comment #3
HansKuiters CreditAttribution: HansKuiters commented