From 5883c410ac76da82d5e382303efda6050a309b77 Mon Sep 17 00:00:00 2001 From: Daniel Gerhardt <code@dgerhardt.net> Date: Wed, 7 Aug 2019 16:14:04 +0200 Subject: [PATCH] Fix URL pattern for account mails String placeholders were numbered incorrectly. Fixes arsnova-backend#47. --- src/main/java/de/thm/arsnova/service/UserServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/thm/arsnova/service/UserServiceImpl.java b/src/main/java/de/thm/arsnova/service/UserServiceImpl.java index 9c3996006..7677a834c 100644 --- a/src/main/java/de/thm/arsnova/service/UserServiceImpl.java +++ b/src/main/java/de/thm/arsnova/service/UserServiceImpl.java @@ -462,7 +462,7 @@ public class UserServiceImpl extends DefaultEntityServiceImpl<UserProfile> imple private void sendActivationEmail(final UserProfile userProfile) { final String activationKey = userProfile.getAccount().getActivationKey(); final String activationUrl = MessageFormat.format( - "{0}{1}/login?action=activate&username={3}&key={4}", + "{0}{1}/login?action=activate&username={2}&key={3}", rootUrl, customizationPath, UriUtils.encodeQueryParam(userProfile.getLoginId(), "UTF-8"), @@ -570,7 +570,7 @@ public class UserServiceImpl extends DefaultEntityServiceImpl<UserProfile> imple } final String resetPasswordUrl = MessageFormat.format( - "{0}{1}/login?action=resetpassword&username={3}&key={4}", + "{0}{1}/login?action=resetpassword&username={2}&key={3}", rootUrl, customizationPath, UriUtils.encodeQueryParam(userProfile.getLoginId(), "UTF-8"), account.getPasswordResetKey()); -- GitLab