Index: lams_central/src/java/org/lamsfoundation/lams/security/UniversalLoginModule.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/security/UniversalLoginModule.java,v diff -u -r1.23 -r1.24 --- lams_central/src/java/org/lamsfoundation/lams/security/UniversalLoginModule.java 2 Nov 2007 01:22:46 -0000 1.23 +++ lams_central/src/java/org/lamsfoundation/lams/security/UniversalLoginModule.java 28 Nov 2007 01:33:17 -0000 1.24 @@ -97,14 +97,14 @@ String username = getUsername(); WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(HttpSessionManager.getInstance().getServletContext()); UserManagementService service = (UserManagementService) ctx.getBean("userManagementService"); - LdapService ldapService = (LdapService) ctx.getBean("ldapService"); User user = service.getUserByLogin(username); log.debug("===> authenticating user: " + username); // LDAP user provisioning if (user == null) { // provision a new user by checking ldap server if (Configuration.getAsBoolean(ConfigurationKeys.LDAP_PROVISIONING_ENABLED)) { + LdapService ldapService = (LdapService) ctx.getBean("ldapService"); log.debug("===> LDAP provisioning is enabled, checking username against LDAP server..."); LDAPAuthenticator ldap = new LDAPAuthenticator(); isValid = ldap.authenticate(username, inputPassword);