if(log.isDebugEnabled())
log.debug("do ldap login");
logon = new LdapLogon();
}
UserVO user = logon.validate(form.getLogin(), form.getPassword(), request.getRemoteAddr(), Logon.Type.WEBAPP, errors);
if((user == null || !errors.isEmpty()) && SystemConfiguration.getInstance().getBooleanValue(SystemConfiguration.Key.LDAP_AUTHENTICATION_ENABLED) && !LdapUtil.getInstance().testLdapConnection()) {
errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("module.common.login.error.noLdapConnection"));
}
if(errors.isEmpty()) {
request.getSession().setAttribute(Globals.USER_KEY, user);
request.getSession().setAttribute(Globals.AUTHENTICATOR_KEY, new Authenticator(user));
request.getSession().setAttribute(org.apache.struts.Globals.LOCALE_KEY, user.getLocale());
request.getSession().setAttribute(Globals.CONFIGURATION_KEY, new UserConfiguration(user));
MenuFactory menuFactory = (MenuFactory)request.getSession().getServletContext().getAttribute(Globals.MENU_FACTORY_KEY);
Menu menu = menuFactory.getCustomizedMenu(AuthenticatorUtility.getAuthenticator(request));
request.getSession().setAttribute(Globals.MENU_KEY, menu);