From 06a77143bd23aa4d160dfaad05853c01df47bc1d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 17 Jan 2017 10:45:56 -0500 Subject: [PATCH] additional logging and removing interstitial session data if plugins don't return interstitials --- src/controllers/index.js | 4 +++- src/emailer.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/controllers/index.js b/src/controllers/index.js index e6b0d3753c..3b22c7ad1f 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -212,7 +212,9 @@ Controllers.registerInterstitial = function (req, res, next) { } if (!data.interstitials.length) { - return next(); + // No interstitials, redirect to home + delete req.session.registration; + return res.redirect('/'); } var renders = data.interstitials.map(function (interstitial) { diff --git a/src/emailer.js b/src/emailer.js index ce90839f12..4ccd35ed99 100644 --- a/src/emailer.js +++ b/src/emailer.js @@ -131,7 +131,7 @@ var fallbackTransport; data.from = data.from_name + '<' + data.from + '>'; delete data.from_name; - winston.verbose('[emailer] Sending email to uid ' + data.uid); + winston.verbose('[emailer] Sending email to uid ' + data.uid + ' (' + data.to + ')'); fallbackTransport.sendMail(data, function (err) { if (err) { winston.error(err);