From 2ba32f752de0f7efa78ddbcd6acef725904378b0 Mon Sep 17 00:00:00 2001 From: Colin McDonald Date: Sat, 23 Jul 2016 19:58:43 -0400 Subject: [PATCH] Fix NPE in POST /users/:id/registerEmail --- .../frozenorb/apiv3/route/users/POSTUsersIdRegisterEmail.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdRegisterEmail.java b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdRegisterEmail.java index c362403..2de0ed1 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdRegisterEmail.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/POSTUsersIdRegisterEmail.java @@ -69,7 +69,7 @@ public final class POSTUsersIdRegisterEmail implements Handler { NotificationTemplate template = SyncUtils.runBlocking(v -> NotificationTemplate.findById("email-confirmation", v)); Notification notification = new Notification(template, replacements, replacements); - notification.sendAsEmail(user.getEmail(), (ignored, error) -> { + notification.sendAsEmail(user.getPendingEmail(), (ignored, error) -> { if (error != null) { ErrorUtils.respondInternalError(ctx, error); } else {