// 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
// - other data
this.setBirthday(null);
this.setComment(null);
+ this.setUserName(null);
this.setUserPassword(null);
this.setUserPasswordRepeat(null);
}
}
@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
}
@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())));
}
}
public void setZipCode (final Integer zipCode);
/**
- * Checks whether given email address is used
+ * Checks whether user instance's email address is used
* <p>
- * @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
public boolean isSamePasswordEntered ();
/**
- * Checks whether given user name is used
+ * Checks whether given user instance's name is used
* <p>
- * @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);
}
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
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
<from-outcome>login_index</from-outcome>
<to-view-id>/login/index.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>resend_link</from-outcome>
+ <to-view-id>/user/resend_link.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/admin/admin_logout.xhtml</from-view-id>
<li><h:link title="#{msg.LINK_GUEST_LOGIN_TITLE}" outcome="user_login" value="#{msg.LINK_GUEST_LOGIN}" /></li>
<li><h:link title="#{msg.LINK_GUEST_REGISTER_TITLE}" outcome="user_register" value="#{msg.LINK_GUEST_REGISTER}" /></li>
<li><h:link title="#{msg.LINK_GUEST_PASSWORD_TITLE}" outcome="user_lost_passwd" value="#{msg.LINK_GUEST_PASSWORD}" /></li>
+ <li><h:link title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" outcome="user_lost_passwd" value="#{msg.LINK_GUEST_RESEND_LINK}" /></li>
</ul>
</div>
</div>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core"
+ >
+
+ <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
+ <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_RESEND_LINK}</ui:define>
+
+ <ui:define name="menu">
+ <ui:include id="menu" class="guest_menu" src="/WEB-INF/templates/guest/guest_menu.tpl" />
+ </ui:define>
+
+ <ui:define name="content_header">
+ #{msg.SUB_TITLE_INDEX_RESEND_LINK}
+ </ui:define>
+
+ <ui:define name="content">
+ Here goes your content.
+ </ui:define>
+
+ <ui:define name="footer">
+ <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/guest/guest_footer.tpl" />
+ </ui:define>
+ </ui:composition>
+</html>