Login/logout system OK

This commit is contained in:
Pierre
2017-03-01 15:37:55 +01:00
parent 92413b3667
commit 60cbfd020d
13 changed files with 134 additions and 17 deletions

View File

@ -163,9 +163,18 @@ ComunicWeb.user.userLogin = {
ComunicWeb.user.loginTokens.setUserTokens(result.tokens, storageType);
}
//Perform next action
afterLogin(loginstate);
//Perform next action if login failed
if(!loginstate) {
afterLogin(loginstate);
return false;
}
//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);
});
};
//Perform request