mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-08 16:22:22 +02:00
Merge pull request #386 from adarqui/issue-login-redirect-40x
Issue login redirect 40x
This commit is contained in:
@@ -117,7 +117,8 @@ var ajaxify = {};
|
||||
if (hrefEmpty(this.href) || this.target !== '' || this.protocol === 'javascript:')
|
||||
return;
|
||||
|
||||
app.previousUrl = window.location.href;
|
||||
if(!window.location.pathname.match(/\/(403|404)$/g))
|
||||
app.previousUrl = window.location.href;
|
||||
|
||||
if (!e.ctrlKey && e.which === 1) {
|
||||
if (this.host === window.location.host) {
|
||||
@@ -192,4 +193,4 @@ var ajaxify = {};
|
||||
}
|
||||
}
|
||||
|
||||
}(jQuery));
|
||||
}(jQuery));
|
||||
|
||||
@@ -35,6 +35,9 @@ define(function() {
|
||||
$('#login-error-notify').show();
|
||||
} else {
|
||||
$('#login-error-notify').hide();
|
||||
|
||||
if(!app.previousUrl) { app.previousUrl = '/'; }
|
||||
|
||||
if(app.previousUrl.indexOf('/reset/') != -1)
|
||||
window.location.replace(RELATIVE_PATH + "/?loggedin");
|
||||
else
|
||||
@@ -63,4 +66,4 @@ define(function() {
|
||||
};
|
||||
|
||||
return Login;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user