Fix NPE in POST /users/:id/registerEmail

This commit is contained in:
Colin McDonald 2016-07-23 19:58:43 -04:00
parent 303634dedc
commit 2ba32f752d

View File

@ -69,7 +69,7 @@ public final class POSTUsersIdRegisterEmail implements Handler<RoutingContext> {
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 {