mirror of
https://github.com/discourse/discourse.git
synced 2025-02-17 00:35:50 +00:00
FIX: Fix the logout functionality in core
This commit is contained in:
parent
a13e7d10cf
commit
68659e834a
@ -1,5 +1,6 @@
|
|||||||
import { url } from 'discourse/lib/computed';
|
import { url } from 'discourse/lib/computed';
|
||||||
import { default as computed, observes } from 'ember-addons/ember-computed-decorators';
|
import { default as computed, observes } from 'ember-addons/ember-computed-decorators';
|
||||||
|
import User from 'discourse/models/user';
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
export default Ember.Component.extend({
|
||||||
classNames: ['user-menu'],
|
classNames: ['user-menu'],
|
||||||
@ -69,6 +70,9 @@ export default Ember.Component.extend({
|
|||||||
Discourse.ajax("/users/toggle-anon", {method: 'POST'}).then(function(){
|
Discourse.ajax("/users/toggle-anon", {method: 'POST'}).then(function(){
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
logout() {
|
||||||
|
User.logout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user