mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
closes #6697
This commit is contained in:
@@ -72,6 +72,10 @@ define('forum/topic/votes', ['components', 'translator', 'benchpress'], function
|
|||||||
if (err) {
|
if (err) {
|
||||||
app.alertError(err.message);
|
app.alertError(err.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (err.message === '[[error:not-logged-in]]') {
|
||||||
|
ajaxify.go('login');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ Controllers.login = function (req, res, next) {
|
|||||||
|
|
||||||
var allowLoginWith = (meta.config.allowLoginWith || 'username-email');
|
var allowLoginWith = (meta.config.allowLoginWith || 'username-email');
|
||||||
var returnTo = (req.headers['x-return-to'] || '').replace(nconf.get('base_url'), '');
|
var returnTo = (req.headers['x-return-to'] || '').replace(nconf.get('base_url'), '');
|
||||||
|
console.log('returnTo is', returnTo);
|
||||||
|
|
||||||
var errorText;
|
var errorText;
|
||||||
if (req.query.error === 'csrf-invalid') {
|
if (req.query.error === 'csrf-invalid') {
|
||||||
|
|||||||
Reference in New Issue
Block a user