Back to index

plone3  3.1.7
getUsersInGroup.py
Go to the documentation of this file.
00001 ## Script (Python) "getUsersInGroup"
00002 ##bind container=container
00003 ##bind context=context
00004 ##bind namespace=
00005 ##bind script=script
00006 ##bind subpath=traverse_subpath
00007 ##parameters=groupid
00008 ##title=
00009 ##
00010 
00011 users=context.acl_users.getUsers()
00012 prefix=context.acl_users.getGroupPrefix()
00013 
00014 avail=[]
00015 for user in users:
00016     for group in user.getGroups():
00017         if groupid==group or \
00018            prefix+groupid==group:
00019             avail.append(user)
00020 
00021 return avail