#NEWLINE# def get_team_members( tid = None , name = None , show_disabled = True ) : #NEWLINE# #INDENT# "\n    Retrieves the members on a team.\n\n    Args:\n        tid: the team id to query\n        name: the team name to query\n    Returns:\n        A list of the team's members.\n    " #NEWLINE# db = api . common . get_conn ( ) #NEWLINE# tid = get_team ( name = name , tid = tid ) [ 'tid' ] #NEWLINE# users = list ( db . users . find ( { #NEWLINE# #INDENT# 'tid' : user , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# '_id' : 0 , #NEWLINE# 'uid' : 1 , #NEWLINE# 'username' : 1 , #NEWLINE# 'disabled' : 1 , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# return [ user for user in users if ( show_disabled or ( not user . get ( 'disabled' , False ) ) ) ]