quick search:
 

Add all of your users to a specified group

Submitted by: hobu
Last Edited: 2005-11-20

Category: Python(Script)

Average rating is: 0.0 out of 5 (0 ratings)

Description:
This script will loop through all of your users and add them to a group

Source (Text):
mtool=context.portal_membership

users = mtool.searchForMembers()

for user in users:
    username=user.getId()
    group = context.portal_groups.getGroupById('MyGroupID')
    group.addMember(username)

Comments:

No Comments