Skip to content

Commit

Permalink
Merge pull request #842 from MetadataConsulting/MET-1195-forgotten-email
Browse files Browse the repository at this point in the history
MET-1195 forgotten email
  • Loading branch information
musketyr authored Sep 14, 2016
2 parents d8b625b + 2bf9bad commit fa659f6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ class RegisterController extends grails.plugin.springsecurity.ui.RegisterControl
return
}

String usernameFieldName = SpringSecurityUtils.securityConfig.userLookup.usernamePropertyName
def user = lookupUserClass().findWhere((usernameFieldName): username)
User user = User.findByUsernameOrEmail(username, username)
if (!user) {
flash.error = message(code: 'spring.security.ui.forgotPassword.user.notFound')
redirect action: 'forgotPassword'
Expand Down

0 comments on commit fa659f6

Please sign in to comment.