I need to run bulk operations on all the users. Like changing the value of a field for all users.
I am using Profile 2 module for extended profile fields.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI need to run bulk operations on all the users. Like changing the value of a field for all users.
I am using Profile 2 module for extended profile fields.
You can use views and views bulk operations for this.
You can create a user view and add a relationship that joins it to the profile2 profile.
Then add the views bulk operations field and configure it to include the "Modify entity values" operation. You could also change the label to "Change profile values" or something if you prefer.
Then on your bulk operations view, select the checkboxed for all the users you want to update a value for, select the "Modify entity values" operation, click the execute button, then complete then next form.
When you do this, you must be setting the fields to the same values for all the users you selected.
If you need to give some users a different value you have to go through the process multiple times.
If you have lots of different data and it wouldn't be feasible to go through this process so many times then you would be better off using something to import your data from csv, like the feeds module or the migrate module.