#NEWLINE# def user_list( domain ) : #NEWLINE# #INDENT# users = list ( CommCareUser . by_domain ( domain ) ) #NEWLINE# users . extend ( CommCareUser . by_domain ( domain , is_active = False ) ) #NEWLINE# users . sort ( key = ( lambda user : ( ( not user . is_active ) , user . username ) ) ) #NEWLINE# return users