feat: allow registration interstitial abort to also follow returnTo

v1.18.x
Julian Lam 4 years ago
parent 96398faa3c
commit b3c916414b

@ -219,9 +219,9 @@ authenticationController.registerComplete = function (req, res, next) {
authenticationController.registerAbort = function (req, res) { authenticationController.registerAbort = function (req, res) {
if (req.uid) { if (req.uid) {
// Clear interstitial data and go home // Clear interstitial data and continue on...
delete req.session.registration; delete req.session.registration;
res.redirect(`${nconf.get('relative_path')}/`); res.redirect(nconf.get('relative_path') + req.session.returnTo);
} else { } else {
// End the session and redirect to home // End the session and redirect to home
req.session.destroy(() => { req.session.destroy(() => {

Loading…
Cancel
Save