]> git.mxchange.org Git - jjobs-war.git/commitdiff
Fixed base URL: (please cherry-pick)
authorRoland Häder <roland@mxchange.org>
Fri, 5 Aug 2016 13:39:44 +0000 (15:39 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 7 Aug 2016 10:29:06 +0000 (12:29 +0200)
- "detect" base URL and handle it over as mail templates may link to the website

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java

index e9ff94d14f584ec27a752c3c7fd0e5d5a04eda81..5729c06df844ebfdfb019f39244af6a5009d96d9 100644 (file)
@@ -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);