IDEMPIERE-4303 : 4303 Web Services : Inconsistency for username (doesn't use LDAPUser) that could lead to not reuse previous sessions (#77)

Fix inconsistency with 'standard' Login method to get the username (LDAPUser / Name)
This commit is contained in:
Nicolas Micoud 2020-05-24 20:02:17 +02:00 committed by GitHub
parent c5de6cf205
commit 8b6d4e5d19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -34,6 +34,7 @@ import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Language;
import org.compiere.util.Login;
import org.compiere.util.Util;
import org.idempiere.adInterface.x10.ADLoginRequest;
/**
@ -263,7 +264,7 @@ public class CompiereService {
if (email_login)
m_userName = user.getEMail();
else
m_userName = user.getName();
m_userName = Util.isEmpty(user.getLDAPUser()) ? user.getName() : user.getLDAPUser();
Env.setContext( getCtx(), "#AD_Language", Lang);
m_language = Language.getLanguage(Lang);