Save language in user account settings.

This commit is contained in:
Pierre HUBERT
2018-08-15 08:26:14 +02:00
parent 40593e00ed
commit c633ce13b5
3 changed files with 46 additions and 3 deletions

View File

@ -174,8 +174,19 @@ ComunicWeb.user.userLogin = {
//Else refresh login state to get user ID
ComunicWeb.user.userLogin.refreshLoginState(function(){
//And then we'll be able to perform next action
afterLogin(true);
//Then get and apply user language settings
ComunicWeb.components.settings.interface.getLanguage(function(lang){
if(!lang.error)
ComunicWeb.common.langs.setLang(lang.lang);
//And then we'll be able to perform next action
afterLogin(true);
});
});
};