final String requestedProfile = request.getParameter(LoginController.REQUESTED_PROFILE_KEY);
if (requestedProfile != null) {
final ProfileSelectionEvent event = new ProfileSelectionEvent(this, requestedProfile, person, request);
this.eventPublisher.publishEvent(event);
} else if(swapperProfile != null) {
final ProfileSelectionEvent event = new ProfileSelectionEvent(this, swapperProfile, person, request);
this.eventPublisher.publishEvent(event);
} else {
if (logger.isTraceEnabled()) {
logger.trace("No requested or swapper profile requested so no profile selection event.");