2

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.

5
  • Are you looking for an UI, or API to so it?
    – Mołot
    Oct 21, 2013 at 9:20
  • @Mołot you can present the both, if you know the answer :)
    – Bala
    Oct 21, 2013 at 9:28
  • @Bala only to get ignored or downvoted if it was the other thing OP wanted? Naaah, thank you, not worth it :P especially that bulk edits was asked here already many times and it is probably answered under older question. After all it even seems OP provided answer in tags, right?
    – Mołot
    Oct 21, 2013 at 9:32
  • @Molot: Good point about the tags :) - I'll give it a shot anyways.
    – rooby
    Oct 21, 2013 at 10:39
  • @Mołot : yes you are right , i had a doubt about VBO , but it worked like a charm , thanks :)
    – brainHax
    Oct 22, 2013 at 11:45

1 Answer 1

5

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.

1
  • It's possible to move data from one field to another (for example from Profile to user account fields) using tokens! It more complex transformation is needed, it's possible to use rules also. Jan 11, 2015 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.