Commit 1057827e authored by Matija Obreza's avatar Matija Obreza
Browse files

Updated texts for password-reset and email-validation cancellations

parent e83dc3dd
......@@ -115,14 +115,16 @@ public class EMailVerificationServiceImpl implements EMailVerificationService {
* User registration has been canceled. Remove user data if user not yet validated.
public void cancelValidation(String tokenUuid) throws Exception {
try {
VerificationToken verificationToken = tokenVerificationService.fetchToken("email-verification", tokenUuid);
String userUuid = verificationToken.getData();
User user = userService.getUser(UUID.fromString(userUuid));
final User user = userService.getUser(UUID.fromString(verificationToken.getData()));
if (user.hasRole(UserRole.VALIDATEDUSER.getName())) {
throw new InvalidApiUsageException("User already validated");
......@@ -157,7 +159,7 @@ public class EMailVerificationServiceImpl implements EMailVerificationService {
public void changePassword(final String tokenUuid, final String key, final String password) throws NoSuchVerificationTokenException, PasswordPolicyException,
TokenExpiredException {
final VerificationToken consumedToken = tokenVerificationService.consumeToken("email-password", tokenUuid, key);
final User user = userService.getUserByUuid(consumedToken.getData());
final User user = userService.getUser(UUID.fromString(consumedToken.getData()));
Authentication prevAuth = SecurityContextHolder.getContext().getAuthentication();
try {
"en": {
"title": "Password resetting canceled",
"body": "<p>Your password reset request is canceled.</p>"
"title": "Password reset request canceled",
"body": "<p>The request to reset the account password is canceled.</p>"
"en": {
"title": "Registration request canceled",
"body": "<p>Your registration request was canceled. Any personal information associated with your account will be removed from Genesys.</p>"
"title": "User account registration canceled",
"body": "<p>The registration of the user account was canceled. Any personal information associated with the account was removed from Genesys.</p>"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment