mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FEATURE: logout redirect support
Allow users to also logout on an external site after logging out locally
This commit is contained in:
@ -81,7 +81,14 @@ window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
|
||||
Discourse.User.logout().then(function() {
|
||||
// Reloading will refresh unbound properties
|
||||
Discourse.KeyValueStore.abandonLocal();
|
||||
window.location.pathname = Discourse.getURL('/');
|
||||
|
||||
var redirect = Discourse.SiteSettings.logout_redirect;
|
||||
if(redirect.length === 0){
|
||||
window.location.pathname = Discourse.getURL('/');
|
||||
} else {
|
||||
window.location.href = redirect;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user