Changeset 1712
- Timestamp:
- Apr 6, 2011, 11:36:21 AM (11 years ago)
- Location:
- trunk/grails-app/controllers/dbnp/authentication
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/authentication/RegisterController.groovy
r1430 r1712 56 56 } 57 57 58 def registrationCode = new RegistrationCode(username: user.username).save() 59 58 def registrationCode = new RegistrationCode(username: user.username, expiryDate: new Date() + 1 ) 59 if( !registrationCode.save() ) { 60 println registrationCode.errors 61 flash.userError = "Your password could not be reset because of database errors. Please contact the system administrator." 62 return 63 } 64 60 65 String url = generateLink('resetPassword', [t: registrationCode.token]) 61 66 -
trunk/grails-app/controllers/dbnp/authentication/UserRegistrationController.groovy
r1688 r1712 239 239 String salt = user.username 240 240 RegistrationCode.withTransaction { status -> 241 user.password = springSecurityService.encodePassword(command.password, salt) 241 if( command.password != "" ) 242 user.password = springSecurityService.encodePassword(command.password, salt) 242 243 user.email = command.email 243 244 user.save() … … 274 275 (!password.matches('^.*\\p{Alpha}.*$') || 275 276 !password.matches('^.*\\p{Digit}.*$') || 276 !password.matches('^.*[!@#$% ^&].*$'))) {277 !password.matches('^.*[!@#$%+^&].*$'))) { 277 278 return 'command.password.error.strength' 278 279 }
Note: See TracChangeset
for help on using the changeset viewer.