From aac3ae98d4f37ce3665433d81106dd6674972459 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 5 Aug 2016 15:39:44 +0200 Subject: [PATCH] Fixed base URL: (please cherry-pick) - "detect" base URL and handle it over as mail templates may link to the website MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../jjobs/beans/user/JobsAdminUserWebRequestBean.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java index e9ff94d1..5729c06d 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java @@ -30,13 +30,16 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcontacts.contact.Contact; +import org.mxchange.jcoreee.utils.FacesUtils; import org.mxchange.jjobs.beans.BaseJobsController; import org.mxchange.jjobs.beans.contact.JobsAdminContactWebRequestController; import org.mxchange.jjobs.beans.contact.JobsContactWebSessionController; +import org.mxchange.jjobs.beans.helper.JobsWebRequestController; import org.mxchange.jusercore.container.login.UserLoginContainer; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; import org.mxchange.jusercore.events.user.add.AdminUserAddedEvent; +import org.mxchange.jusercore.events.user.linked.AdminUserLinkedEvent; import org.mxchange.jusercore.events.user.update.AdminUpdatedUserDataEvent; import org.mxchange.jusercore.events.user.update.AdminUserDataUpdatedEvent; import org.mxchange.jusercore.exceptions.EmailAddressAlreadyRegisteredException; @@ -52,8 +55,6 @@ import org.mxchange.jusercore.model.user.UserSessionBeanRemote; import org.mxchange.jusercore.model.user.UserUtils; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; import org.mxchange.jusercore.model.user.status.UserAccountStatus; -import org.mxchange.jjobs.beans.helper.JobsWebRequestController; -import org.mxchange.jusercore.events.user.linked.AdminUserLinkedEvent; /** * A user bean (controller) @@ -461,8 +462,11 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J } try { + // Get base URL + String baseUrl = FacesUtils.generateBaseUrl(); + // Call EJB to lock account - this.adminUserBean.lockUserAccount(user, this.getUserLockReason()); + this.adminUserBean.lockUserAccount(user, this.getUserLockReason(), baseUrl); } catch (final UserStatusLockedException | UserStatusUnconfirmedException | UserNotFoundException ex) { // Throw again throw new FaceletException(ex); -- 2.39.5