summaryrefslogtreecommitdiffstats
path: root/pykolab/auth/ldap/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/auth/ldap/__init__.py')
-rw-r--r--pykolab/auth/ldap/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index f725d87..e7de7d2 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1026,7 +1026,8 @@ class LDAP(object):
'sn',
'givenname',
'cn',
- 'uid'
+ 'uid',
+ 'preferredLanguage'
]:
if not user.has_key(attribute):
_get_attrs.append(attribute)
@@ -1037,6 +1038,9 @@ class LDAP(object):
for key in _user_attrs.keys():
user[key] = _user_attrs[key]
+ if user['preferredLanguage'] == None:
+ self._set_user_attribute(user, 'preferredLanguage', conf.get('ldap', 'default_locale'))
+
# Check to see if we want to apply a primary mail recipient policy
if conf.has_option(primary_domain, 'primary_mail'):
primary_mail = conf.plugins.exec_hook(