if interstitials don't pass any errors back but some still exist, redirect properly

v1.18.x
Julian Lam 9 years ago
parent fafcdf8320
commit 98368bbb6a

@ -94,7 +94,11 @@ function registerAndLoginUser(req, res, userData, callback) {
} else { } else {
userData.register = true; userData.register = true;
req.session.registration = userData; req.session.registration = userData;
return res.json({ referrer: nconf.get('relative_path') + '/register/complete' }); if (res.locals.isAPI) {
return res.json({ referrer: nconf.get('relative_path') + '/register/complete' });
} else {
return res.redirect(nconf.get('relative_path') + '/register/complete');
}
} }
}); });
}, },

Loading…
Cancel
Save