summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pykolab/auth/ldap/__init__.py7
-rw-r--r--pykolab/conf/defaults.py2
2 files changed, 7 insertions, 2 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index e7de7d2..0d88981 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1039,7 +1039,12 @@ class LDAP(object):
user[key] = _user_attrs[key]
if user['preferredLanguage'] == None:
- self._set_user_attribute(user, 'preferredLanguage', conf.get('ldap', 'default_locale'))
+ if conf.has_option(primary_domain, 'default_locale'):
+ default_locale = conf.get(primary_domain, 'default_locale')
+ else:
+ default_locale = conf.get('kolab','default_locale')
+
+ self._set_user_attribute(user, 'preferredLanguage', default_locale)
# Check to see if we want to apply a primary mail recipient policy
if conf.has_option(primary_domain, 'primary_mail'):
diff --git a/pykolab/conf/defaults.py b/pykolab/conf/defaults.py
index 17f4724..e9c4088 100644
--- a/pykolab/conf/defaults.py
+++ b/pykolab/conf/defaults.py
@@ -31,4 +31,4 @@ class Defaults(object):
self.address_search_attrs = "mail, alias"
- self.default_locale = 'en_US'
+ self.kolab_default_locale = 'en_US'