, "user.group.accept.invitation.existing.user"
);
}
protected String prepareShowAcceptUserInvitation(HttpServletRequest request, Long usrId, Long grpId) {
UserImpl u = null;
Group g = null;
try {
u = (UserImpl)DaoFactory.getUserDao().find(usrId);
g = (Group)DaoFactory.getGroupDao().find(grpId);
} catch (Exception e) {
addWOJMessages(request, RessourceBundleApplicationMessage.error("woj.page.admin.user.group.accept.invite.error.invalid.parameters", null));
return "error.msg";
}
if (u==null || g==null) {
addWOJMessages(request, RessourceBundleApplicationMessage.error("woj.page.admin.user.group.accept.invite.error.invalid.parameters", null));
return "error.msg";
}
License userLicense = u.getLicenseUsed();
if (userLicense == null || !ServiceFactory.getLicenseService().isGroupable(userLicense) || !u.isLicenseValid()) {
addWOJMessages(request, RessourceBundleApplicationMessage.error("woj.page.admin.user.group.accept.invite.error.invalid.parameters", null));
return "error.msg";
}
if (userLicense.getGroup() != null) {
request.setAttribute(Params.USER_GROUP.INVITATION.SHOW.REQUEST.CURRENT_GROUP, userLicense.getGroup());