Email Confirmation Article

Controller edited
This commit is contained in:
egmp777 2014-11-29 08:08:00 -05:00
parent fcef9867ec
commit 70ccda8cde
2 changed files with 5 additions and 9 deletions

View File

@ -63,10 +63,6 @@ public class RegistrationController {
} }
User user = verificationToken.getUser(); User user = verificationToken.getUser();
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();
if (user == null) {
model.addAttribute("message", messages.getMessage("auth.message.invalidUser", null, request.getLocale()));
return "redirect:/badUser.html?lang=" + request.getLocale().getLanguage();
}
if ((verificationToken.getExpiryDate().getTime() - cal.getTime().getTime()) <= 0) { if ((verificationToken.getExpiryDate().getTime() - cal.getTime().getTime()) <= 0) {
user.setTokenExpired(true); user.setTokenExpired(true);
} }

View File

@ -1,13 +1,13 @@
################### DataSource Configuration ########################## ################### DataSource Configuration ##########################
jdbc.driverClassName=com.mysql.jdbc.Driver jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/spring_hibernate4_02?createDatabaseIfNotExist=true jdbc.url=jdbc:mysql://localhost:3306/AUTHDATA
jdbc.user=tutorialuser jdbc.user=root
jdbc.pass=tutorialmy5ql ###jdbc.pass=admin###
init-db=false init-db=false
################### Hibernate Configuration ########################## ################### Hibernate Configuration ##########################
hibernate.dialect=org.hibernate.dialect.MySQLDialect hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=false hibernate.show_sql=true
hibernate.hbm2ddl.auto=create-drop hibernate.hbm2ddl.auto=validate
################### JavaMail Configuration ########################## ################### JavaMail Configuration ##########################
smtp.host=smtp.gmail.com smtp.host=smtp.gmail.com
smtp.port=465 smtp.port=465