mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 12:53:42 +08:00
FEATURE: logout redirect support
Allow users to also logout on an external site after logging out locally
This commit is contained in:
parent
347aa343b0
commit
465c2a2ba8
|
@ -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;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -923,6 +923,7 @@ en:
|
|||
delete_all_posts_max: "The maximum number of posts that can be deleted at once with the Delete All Posts button. If a user has more than this many posts, the posts cannot all be deleted at once and the user can't be deleted."
|
||||
username_change_period: "The number of days after registration that accounts can change their username (0 to disallow username change)."
|
||||
email_editable: "Allow users to change their e-mail address after registration."
|
||||
logout_redirect: "Location to redirect browser to after logout EG: (http://somesite.com/logout)"
|
||||
|
||||
allow_uploaded_avatars: "Allow users to upload custom avatars."
|
||||
allow_animated_avatars: "Allow users to use animated gif avatars. WARNING: run the avatars:refresh rake task after changing this setting."
|
||||
|
|
|
@ -255,6 +255,9 @@ users:
|
|||
username_change_period: 3
|
||||
auto_track_topics_after: 240000
|
||||
email_editable: true
|
||||
logout_redirect:
|
||||
client: true
|
||||
default: ''
|
||||
enable_names:
|
||||
client: true
|
||||
default: true
|
||||
|
|
Loading…
Reference in New Issue
Block a user