Add preliminary group management functions
[public/pyceo-broken.git] / pylib / csc / adm / members.py
index 2dda57f..83152ca 100644 (file)
@@ -299,6 +299,17 @@ def member_terms(userid):
     else:
         return member['term']
 
+def group_members(group):
+
+    """
+    Returns a list of group members
+    """
+
+    group = ldap_connection.group_lookup(group)
+    if not 'uniqueMember' in group:
+        return []
+    else:
+        return group['uniqueMember']
 
 
 ### Tests ###