summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-10-28 12:14:52 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-10-28 12:14:52 +0100
commit7790ecb12466e2022061ca5cd0b0565975349681 (patch)
tree84e7c761f38de6ea556d2a6539573eead2cd70af /pykolab
parent5b5a863282fb37508a4536bdbaa670912317aebc (diff)
downloadpykolab-7790ecb12466e2022061ca5cd0b0565975349681.tar.gz
Allow the user to be passed to be a simple dn basestring
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 8b224ee..5390a86 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -706,6 +706,9 @@ class LDAP(object):
def _set_user_attribute(self, user, attribute, value):
self._bind()
+ if isinstance(user, basestring):
+ user = { "dn": user }
+
attribute = attribute.lower()
mode = None