Index: lams_central/src/java/org/lamsfoundation/lams/web/LoginRequestServlet.java =================================================================== diff -u -r7f889fb32c17c3d360197361b35d077dff038f13 -ra350a5e4ff7020b51d00085720b7f4ce17d0ed0c --- lams_central/src/java/org/lamsfoundation/lams/web/LoginRequestServlet.java (.../LoginRequestServlet.java) (revision 7f889fb32c17c3d360197361b35d077dff038f13) +++ lams_central/src/java/org/lamsfoundation/lams/web/LoginRequestServlet.java (.../LoginRequestServlet.java) (revision a350a5e4ff7020b51d00085720b7f4ce17d0ed0c) @@ -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");