From: Roland Haeder Date: Wed, 7 Oct 2015 11:21:03 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a12d504be4f40d08adbae4ed3a548873dd28a0e8;p=jfinancials-war.git Continued: - added new page resend_link.xhtml for resending confirmation link - added language strings for above new page (all pages get at least 2 strings) - forgot to clear userName property in bean - better handle over whole User instance instead of "raw data" - updated jar(s) Signed-off-by:Roland Häder --- diff --git a/lib/juser-core.jar b/lib/juser-core.jar index 791ee3aa..cc3731c8 100644 Binary files a/lib/juser-core.jar and b/lib/juser-core.jar differ diff --git a/lib/juser-lib.jar b/lib/juser-lib.jar index 6457e8da..394fea93 100644 Binary files a/lib/juser-lib.jar and b/lib/juser-lib.jar differ diff --git a/src/java/org/mxchange/addressbook/beans/register/UserRegisterWebBean.java b/src/java/org/mxchange/addressbook/beans/register/UserRegisterWebBean.java index 6edf2af6..b3a75281 100644 --- a/src/java/org/mxchange/addressbook/beans/register/UserRegisterWebBean.java +++ b/src/java/org/mxchange/addressbook/beans/register/UserRegisterWebBean.java @@ -82,19 +82,19 @@ public class UserRegisterWebBean implements UserRegisterWebController { // Is the user already used? if (!this.userController.isRequiredPersonalDataSet()) { // Not all required fields are set - throw new FaceletException("Not all required fields are set."); - } else if (this.userController.isUserNameRegistered(user.getUserName())) { + throw new FaceletException("Not all required fields are set."); //NOI18N + } else if (this.userController.isUserNameRegistered(user)) { // User name is already used throw new FaceletException(new UserNameAlreadyRegisteredException(user)); - } else if (this.userController.isEmailAddressRegistered(user.getUserContact().getEmailAddress())) { + } else if (this.userController.isEmailAddressRegistered(user)) { // Email address has already been taken throw new FaceletException(new EmailAddressAlreadyRegisteredException(user)); } else if (!this.userController.isSameEmailAddressEntered()) { // Not same email address entered - throw new FaceletException(new DataRepeatMismatchException(MessageFormat.format("Email addresses not matching: {0} != {1}", this.userController.getEmailAddress(), this.userController.getEmailAddressRepeat()))); + throw new FaceletException(new DataRepeatMismatchException(MessageFormat.format("Email addresses not matching: {0} != {1}", this.userController.getEmailAddress(), this.userController.getEmailAddressRepeat()))); //NOI18N } else if (!this.userController.isSamePasswordEntered()) { // Not same password entered - throw new FaceletException(new DataRepeatMismatchException("Passwords not matching.")); + throw new FaceletException(new DataRepeatMismatchException("Passwords not matching.")); //NOI18N } // Encrypt password diff --git a/src/java/org/mxchange/addressbook/beans/user/UserWebBean.java b/src/java/org/mxchange/addressbook/beans/user/UserWebBean.java index ab9f5b65..fdf037db 100644 --- a/src/java/org/mxchange/addressbook/beans/user/UserWebBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/UserWebBean.java @@ -222,6 +222,7 @@ public class UserWebBean implements UserWebController { // - other data this.setBirthday(null); this.setComment(null); + this.setUserName(null); this.setUserPassword(null); this.setUserPasswordRepeat(null); } @@ -491,8 +492,8 @@ public class UserWebBean implements UserWebController { } @Override - public boolean isEmailAddressRegistered (final String emailAddress) { - return ((this.emailAddressList instanceof List) && (this.emailAddressList.contains(emailAddress))); + public boolean isEmailAddressRegistered (final User user) { + return ((this.emailAddressList instanceof List) && (this.emailAddressList.contains(user.getUserContact().getEmailAddress()))); } @Override @@ -522,7 +523,7 @@ public class UserWebBean implements UserWebController { } @Override - public boolean isUserNameRegistered (final String userName) { - return ((this.userNameList instanceof List) && (this.userNameList.contains(userName))); + public boolean isUserNameRegistered (final User user) { + return ((this.userNameList instanceof List) && (this.userNameList.contains(user.getUserName()))); } } diff --git a/src/java/org/mxchange/addressbook/beans/user/UserWebController.java b/src/java/org/mxchange/addressbook/beans/user/UserWebController.java index b93bf115..a661d10e 100644 --- a/src/java/org/mxchange/addressbook/beans/user/UserWebController.java +++ b/src/java/org/mxchange/addressbook/beans/user/UserWebController.java @@ -321,12 +321,12 @@ public interface UserWebController extends Serializable { public void setZipCode (final Integer zipCode); /** - * Checks whether given email address is used + * Checks whether user instance's email address is used *

- * @param emailAddress Email address to check + * @param user User instance's email address to check * @return Whether it is already used */ - public boolean isEmailAddressRegistered (final String emailAddress); + public boolean isEmailAddressRegistered (final User user); /** * Checks whether all required personal data is set @@ -350,10 +350,10 @@ public interface UserWebController extends Serializable { public boolean isSamePasswordEntered (); /** - * Checks whether given user name is used + * Checks whether given user instance's name is used *

- * @param userName User name to check + * @param user User instance's name to check * @return Whether it is already used */ - public boolean isUserNameRegistered (final String userName); + public boolean isUserNameRegistered (final User user); } diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 01d4628b..3fff23d5 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -113,3 +113,7 @@ GUEST_USER_REGISTRATION_COMPLETED=Die Anmeldung ist abgeschlossen und Ihr Accoun PERSONAL_DATA_COUNTRY_CODE=L\u00e4ndercode: PAGE_TITLE_USER_REGISTER_DONE=Anmeldung abgeschlossen SUB_TITLE_USER_REGISTER_DONE=Die Anmeldung ist abgeschlossen: +PAGE_TITLE_INDEX_RESEND_LINK=Best\u00e4tigungslink erneut aussenden +SUB_TITLE_INDEX_RESEND_LINK=Best\u00e4tigungslink anfordern: +LINK_GUEST_RESEND_LINK=Best\u00e4tigungslink +LINK_GUEST_RESEND_LINK_TITLE=Best\u00e4tigungslink erneut aussenden diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 761a8817..bbb49465 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -113,3 +113,7 @@ GUEST_USER_REGISTRATION_COMPLETED=The registration is completed and your account PERSONAL_DATA_COUNTRY_CODE=Country code: PAGE_TITLE_USER_REGISTER_DONE=Registration completed SUB_TITLE_USER_REGISTER_DONE=Registration is completed: +PAGE_TITLE_INDEX_RESEND_LINK=Resend confirmation link +SUB_TITLE_INDEX_RESEND_LINK=Request confirmation link: +LINK_GUEST_RESEND_LINK=Confirmation link +LINK_GUEST_RESEND_LINK_TITLE=Resend confirmation link diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 2078bf98..ab8b7f84 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -53,6 +53,10 @@ login_index /login/index.xhtml + + resend_link + /user/resend_link.xhtml + /admin/admin_logout.xhtml diff --git a/web/WEB-INF/templates/guest/guest_menu.tpl b/web/WEB-INF/templates/guest/guest_menu.tpl index e9369cca..c7c2389a 100644 --- a/web/WEB-INF/templates/guest/guest_menu.tpl +++ b/web/WEB-INF/templates/guest/guest_menu.tpl @@ -24,6 +24,7 @@

  • +
  • diff --git a/web/user/resend_link.xhtml b/web/user/resend_link.xhtml new file mode 100644 index 00000000..ebb62a4a --- /dev/null +++ b/web/user/resend_link.xhtml @@ -0,0 +1,28 @@ + + + + + + #{msg.PAGE_TITLE_INDEX_RESEND_LINK} + + + + + + + #{msg.SUB_TITLE_INDEX_RESEND_LINK} + + + + Here goes your content. + + + + + + +