diff --git a/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/AuthenticationManagerImpl.java b/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/AuthenticationManagerImpl.java index 81de687b92f..d170b5f4921 100644 --- a/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/AuthenticationManagerImpl.java +++ b/java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/AuthenticationManagerImpl.java @@ -153,8 +153,10 @@ public class AuthenticationManagerImpl implements AuthenticationManager { public void onSuccess(SuccessInfo result) { if (result.isSuccessful()) { callback.onSuccess(result); - // when a user logs in we explicitly switch to the user's locale event if a locale is given by the URL - redirectIfLocaleIsSetAndLocaleIsNotGivenInTheURL(result.getUserDTO().getLocale()); + if (ExperimentalFeatures.REFRESH_ON_LOCALE_CHANGE_IN_USER_PROFILE) { + // when a user logs in we explicitly switch to the user's locale event if a locale is given by the URL + redirectIfLocaleIsSetAndLocaleIsNotGivenInTheURL(result.getUserDTO().getLocale()); + } } else { if (SuccessInfo.FAILED_TO_LOGIN.equals(result.getMessage())) { view.setErrorMessage(StringMessages.INSTANCE.failedToSignIn());