summaryrefslogtreecommitdiffstats
path: root/pykolab/auth/ldap
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/auth/ldap')
-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