|
|
|
@ -164,15 +164,15 @@ authenticationController.registerComplete = async function (req, res) {
|
|
|
|
|
|
|
|
|
|
const done = function (data) {
|
|
|
|
|
delete req.session.registration;
|
|
|
|
|
|
|
|
|
|
const relative_path = nconf.get('relative_path');
|
|
|
|
|
if (data && data.message) {
|
|
|
|
|
return res.redirect(`${nconf.get('relative_path')}/?register=${encodeURIComponent(data.message)}`);
|
|
|
|
|
return res.redirect(`${relative_path}/?register=${encodeURIComponent(data.message)}`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (req.session.returnTo) {
|
|
|
|
|
res.redirect(nconf.get('relative_path') + req.session.returnTo);
|
|
|
|
|
res.redirect(relative_path + req.session.returnTo.replace(new RegExp(`^${relative_path}`), ''));
|
|
|
|
|
} else {
|
|
|
|
|
res.redirect(`${nconf.get('relative_path')}/`);
|
|
|
|
|
res.redirect(`${relative_path}/`);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|