Commits

Zhang Huangbin  committed 3462a17

Render page in language wichi stored in LDAP.

  • Participants
  • Parent commits 04d22a8

Comments (0)

Files changed (1)

File controllers/ldap/basic.py

                 # Expire session when browser closed.
                 web.config.session_parameters['timeout'] = 600      # 10 minutes
 
+            # Read preferred language from db.
+            try:
+                adminLib = admin.Admin()
+                lang = adminLib.getPreferredLanguage(userdn)
+                if lang is not False:
+                    session['lang'] = lang
+            except:
+                pass
+
             web.seeother('/dashboard')
         else:
             session['failedTimes'] += 1