return loginResult.getLoginResultStatus();
}
if (UserFilter.isUpdateRequiredFirst() == true) {
internalLogin(page, user);
log.info("Admin login for maintenance (data-base update) successful for user '" + username + "'.");
throw new RestartResponseException(SystemUpdatePage.class);
}
log.info("User successfully logged in: " + user.getDisplayUsername());
if (userWantsToStayLoggedIn == true) {
final PFUserDO loggedInUser = userDao.internalGetById(user.getId());
final Cookie cookie = new Cookie("stayLoggedIn", loggedInUser.getId()
+ ":"
+ loggedInUser.getUsername()
+ ":"
+ userDao.getStayLoggedInKey(user.getId()));
UserFilter.addStayLoggedInCookie(WicketUtils.getHttpServletRequest(page.getRequest()),
WicketUtils.getHttpServletResponse(page.getResponse()), cookie);
}
internalLogin(page, user);
// Do not redirect to requested page in maintenance mode (update required first):
if (UserFilter.isUpdateRequiredFirst() == true) {
throw new RestartResponseException(SystemUpdatePage.class);
}
page.continueToOriginalDestination();
// Redirect only if not a redirect is set by Wicket.
throw new RestartResponseException(defaultPage);
}