sobjects/ldapparser.py
changeset 8918 43fd866e8f8a
parent 8917 685b93559e33
child 8919 4cba95ef4738
--- a/sobjects/ldapparser.py	Wed Apr 24 14:00:52 2013 +0200
+++ b/sobjects/ldapparser.py	Wed Apr 24 17:39:10 2013 +0200
@@ -32,7 +32,7 @@
     __regid__ = 'ldapfeed'
     # attributes that may appears in source user_attrs dict which are not
     # attributes of the cw user
-    non_attribute_keys = set(('email',))
+    non_attribute_keys = set(('email', 'eid'))
 
     @cachedproperty
     def searchfilterstr(self):
@@ -43,11 +43,13 @@
     def source_entities_by_extid(self):
         source = self.source
         if source.user_base_dn.strip():
+            attrs = map(str, source.user_attrs.keys())
             return dict((userdict['dn'], userdict)
                         for userdict in source._search(self._cw,
                                                        source.user_base_dn,
                                                        source.user_base_scope,
-                                                       self.searchfilterstr))
+                                                       self.searchfilterstr,
+                                                       attrs))
         return {}
 
     def process(self, url, raise_on_error=False):