additional logging and removing interstitial session data if plugins don't return interstitials

This commit is contained in:
Julian Lam
2017-01-17 10:45:56 -05:00
parent 762d660447
commit 06a77143bd
2 changed files with 4 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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);