From: Roland Häder Date: Wed, 20 May 2020 16:42:59 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2bad28ace0cbfcbb9aba90d063bbd9d62713376c;p=jjobs-war.git Please cherry-pick: - renamed userCreated -> userEntryCreated - renamed userUpdated -> userEntryUpdated - updateUserData() may throw a checked UserNotFoundException, let's catch it here and throw a FacesException with it as cause - same with confirmAccount() Signed-off-by: Roland Häder --- diff --git a/lib/jbonuscard-core.jar b/lib/jbonuscard-core.jar new file mode 100644 index 00000000..2aa8f1a6 Binary files /dev/null and b/lib/jbonuscard-core.jar differ diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java index 5c4486e5..5e6537a7 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java @@ -437,8 +437,16 @@ public class JobsAdminUserWebRequestBean extends BaseJobsBean implements JobsAdm this.getUser().setUserEncryptedPassword(encryptedPassword); } - // Call EJB for updating user data - final User updatedUser = this.userBean.updateUserData(this.getUser()); + // Init updated User instance + final User updatedUser; + + try { + // Call EJB for updating user data + updatedUser = this.userBean.updateUserData(this.getUser()); + } catch (final UserNotFoundException ex) { + // Throw as cause + throw new FacesException(ex); + } // Fire event this.updatedUserDataEvent.fire(new AdminPostUserDataUpdatedEvent(updatedUser)); diff --git a/src/java/org/mxchange/jjobs/beans/user/confirmlink/JobsConfirmationLinkWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/confirmlink/JobsConfirmationLinkWebRequestBean.java index c03ac3ca..7c41ba0d 100644 --- a/src/java/org/mxchange/jjobs/beans/user/confirmlink/JobsConfirmationLinkWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/confirmlink/JobsConfirmationLinkWebRequestBean.java @@ -32,6 +32,7 @@ import org.mxchange.jjobs.beans.BaseJobsBean; import org.mxchange.jjobs.beans.user.list.JobsUserListWebViewController; import org.mxchange.jusercore.events.user.created.CreatedUserEvent; import org.mxchange.jusercore.events.user.created.ObservableCreatedUserEvent; +import org.mxchange.jusercore.exceptions.UserNotFoundException; import org.mxchange.jusercore.exceptions.UserStatusConfirmedException; import org.mxchange.jusercore.exceptions.UserStatusLockedException; import org.mxchange.jusercore.model.user.User; @@ -183,7 +184,7 @@ public class JobsConfirmationLinkWebRequestBean extends BaseJobsBean implements // Confirm account updatedUser = this.userBean.confirmAccount(user, baseUrl); - } catch (final UserStatusConfirmedException | UserStatusLockedException ex) { + } catch (final UserStatusConfirmedException | UserStatusLockedException | UserNotFoundException ex) { // Something unexpected happened throw new FacesException(MessageFormat.format("Cannot confirm user account {0}", user.getUserName()), ex); //NOI18N } diff --git a/web/WEB-INF/templates/admin/user/admin_show_user_data.tpl b/web/WEB-INF/templates/admin/user/admin_show_user_data.tpl index 28f60d9e..e114c2d9 100644 --- a/web/WEB-INF/templates/admin/user/admin_show_user_data.tpl +++ b/web/WEB-INF/templates/admin/user/admin_show_user_data.tpl @@ -37,17 +37,17 @@ - + - + - + - + diff --git a/web/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl b/web/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl index 23db73bd..b6a0db4d 100644 --- a/web/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl +++ b/web/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl @@ -46,9 +46,9 @@ - + - + diff --git a/web/admin/user/admin_user_activity_log.xhtml b/web/admin/user/admin_user_activity_log.xhtml index 9a7cf4cf..b3e24ed4 100644 --- a/web/admin/user/admin_user_activity_log.xhtml +++ b/web/admin/user/admin_user_activity_log.xhtml @@ -117,7 +117,7 @@ - + diff --git a/web/admin/user/admin_user_list.xhtml b/web/admin/user/admin_user_list.xhtml index a3fed78d..425ae0d4 100644 --- a/web/admin/user/admin_user_list.xhtml +++ b/web/admin/user/admin_user_list.xhtml @@ -241,20 +241,20 @@ - + - + @@ -358,7 +358,6 @@ - +