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();
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) {
user.setTokenExpired(true);
}

View File

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