Merge pull request #902 from gerbermichi/reset-password-email-fix

fix reset-password-email
This commit is contained in:
Stian Thorgersen 2015-01-02 13:51:08 +01:00
commit 6462da2c72

View file

@ -704,11 +704,11 @@ public class UsersResource {
clientSession.setUserSession(userSession);
ClientSessionCode accessCode = new ClientSessionCode(realm, clientSession);
accessCode.setRequiredAction(UserModel.RequiredAction.UPDATE_PASSWORD);
accessCode.setAction(ClientSessionModel.Action.RECOVER_PASSWORD);
try {
UriBuilder builder = Urls.loginPasswordResetBuilder(uriInfo.getBaseUri());
builder.queryParam("code", accessCode.getCode());
builder.queryParam("key", accessCode.getCode());
String link = builder.build(realm.getName()).toString();
long expiration = TimeUnit.SECONDS.toMinutes(realm.getAccessCodeLifespanUserAction());