Index: lams_central/src/java/org/lamsfoundation/lams/web/LoginRequestServlet.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/LoginRequestServlet.java,v diff -u -r1.21.2.8 -r1.21.2.9 --- lams_central/src/java/org/lamsfoundation/lams/web/LoginRequestServlet.java 4 Aug 2015 21:04:54 -0000 1.21.2.8 +++ lams_central/src/java/org/lamsfoundation/lams/web/LoginRequestServlet.java 5 Aug 2015 17:46:47 -0000 1.21.2.9 @@ -132,6 +132,12 @@ } Authenticator.authenticateLoginRequest(serverMap, timestamp, extUsername, method, lsId, hash); + if (extCourseId != null) { + // check if organisation, ExtCourseClassMap and user roles exist and up-to-date, and if not update them + getService().getExtCourseClassMap(serverMap, userMap, extCourseId, countryIsoCode, langIsoCode, + courseName, method, prefix); + } + User user = userMap.getUser(); String login = user.getLogin(); UserDTO loggedInUserDTO = (UserDTO) hses.getAttribute(AttributeNames.USER); @@ -145,12 +151,6 @@ return; } - if (extCourseId != null) { - // check if organisation, ExtCourseClassMap and user roles exist and up-to-date, and if not update them - getService().getExtCourseClassMap(serverMap, userMap, extCourseId, countryIsoCode, langIsoCode, - courseName, method, prefix); - } - // check if there is a redirect URL parameter already String redirectURL = WebUtil.getBaseServerURL() + LoginRequestDispatcher.getRequestURL(request); redirectURL = URLEncoder.encode(redirectURL, "UTF-8");