Adding a user to multiple groups

Hi,

1)I want to add  a user to multiple groups.Is there any way I can add at a time rather than adding the user each time to the particular group?

2)Is there any way I can replicate a user i.e., creating new user and adding all the groups that existing user belong?

 

Regards

  Discussion posts and replies are publicly visible

Parents
  • 1. You can use the "Add Group Members" smart service, and simply iterate over the node using MNI for each group within a list (say, pv!groupList)

    2. You can use the function getGroupsForMemberUser() to get all of the groups for the user you want to replicate, and then pass the resulting list into your pv!groupList in step #1

    I'm sure there are many ways to accomplish this, but this is one that should work relatively easily.
Reply
  • 1. You can use the "Add Group Members" smart service, and simply iterate over the node using MNI for each group within a list (say, pv!groupList)

    2. You can use the function getGroupsForMemberUser() to get all of the groups for the user you want to replicate, and then pass the resulting list into your pv!groupList in step #1

    I'm sure there are many ways to accomplish this, but this is one that should work relatively easily.
Children
No Data