aboutsummaryrefslogtreecommitdiff
path: root/rhodecode/model/user.py
diff options
context:
space:
mode:
authorMarcin Kuzminski <marcin@python-works.com>2011-10-07 13:47:55 +0200
committerMarcin Kuzminski <marcin@python-works.com>2011-10-07 13:47:55 +0200
commit5857ec4cdebd4fbc6e2891a0f0fabfcab21a1b17 (patch)
tree70b1015d7794c0c4b8eb564c2e49e3fff4e331b3 /rhodecode/model/user.py
parent7d0154b1871994bc5096331fc4de0f7706df631d (diff)
fixes #256 fixes non ascii chars problems in base_dn on LDAP user creation
--HG-- branch : beta
Diffstat (limited to 'rhodecode/model/user.py')
-rw-r--r--rhodecode/model/user.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rhodecode/model/user.py b/rhodecode/model/user.py
index 1e3bb7f6..fa124b50 100644
--- a/rhodecode/model/user.py
+++ b/rhodecode/model/user.py
@@ -28,6 +28,7 @@ import traceback
from pylons.i18n.translation import _
+from rhodecode.lib import safe_unicode
from rhodecode.model import BaseModel
from rhodecode.model.caching_query import FromCache
from rhodecode.model.db import User, RepoToPerm, Repository, Permission, \
@@ -111,7 +112,7 @@ class UserModel(BaseModel):
new_user.api_key = generate_api_key(username)
new_user.email = attrs['email']
new_user.active = True
- new_user.ldap_dn = user_dn
+ new_user.ldap_dn = safe_unicode(user_dn)
new_user.name = attrs['name']
new_user.lastname = attrs['lastname']