I don't think there is one built in but it should be simple. Something
like this maybe:

def get_members(role):
    try:
        group = db(db.auth_group.role==role).select()[0]
        members = db(db.auth_membership.group_id==group.id).select()
        return members
    except:
        return None

On Feb 7, 1:03 am, weheh <[email protected]> wrote:
> Is there a built-in function that will list all members of a group, or
> do I need to write a query to do that? Seems like such a function
> should exist, but I can't find it in the doc.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to