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=7e5ad3519764af5829470ca24c8bfb9bce5fc2c6;p=jfinancials-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/jfinancials/beans/user/FinancialsAdminUserWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/user/FinancialsAdminUserWebRequestBean.java index f8cbb418..37af0ee8 100644 --- a/src/java/org/mxchange/jfinancials/beans/user/FinancialsAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/jfinancials/beans/user/FinancialsAdminUserWebRequestBean.java @@ -431,8 +431,16 @@ public class FinancialsAdminUserWebRequestBean extends BaseFinancialsBean implem 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/jfinancials/beans/user/confirmlink/FinancialsConfirmationLinkWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/user/confirmlink/FinancialsConfirmationLinkWebRequestBean.java index ab615016..0025e5b0 100644 --- a/src/java/org/mxchange/jfinancials/beans/user/confirmlink/FinancialsConfirmationLinkWebRequestBean.java +++ b/src/java/org/mxchange/jfinancials/beans/user/confirmlink/FinancialsConfirmationLinkWebRequestBean.java @@ -32,6 +32,7 @@ import org.mxchange.jfinancials.beans.BaseFinancialsBean; import org.mxchange.jfinancials.beans.user.list.FinancialsUserListWebViewController; 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 FinancialsConfirmationLinkWebRequestBean extends BaseFinancialsBean // 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 63b7cde7..e0ec4c6d 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 @@ - +