int dummySession = subjectManager.loginLocal(userName, pForm.getCurrentPassword()).getSessionId();
subjectManager.logout(dummySession);
// The above killed our session for subject if subject == userToBeModified
if (isSameUser) {
subject = subjectManager.loginLocal(userName, pForm.getCurrentPassword());
}
} catch (LoginException e) {
RequestUtils.setError(request, "admin.user.error.WrongPassword", "currentPassword");
return returnFailure(request, mapping, ParamConstants.USER_PARAM, pForm.getId());
}