Merge pull request #3716 from cpradio/fix-logout-core

FIX: Fix the logout functionality in core
This commit is contained in:
Sam 2015-09-01 08:44:06 +10:00
commit eba0350310

View File

@ -1,5 +1,6 @@
import { url } from 'discourse/lib/computed';
import { default as computed, observes } from 'ember-addons/ember-computed-decorators';
import User from 'discourse/models/user';
export default Ember.Component.extend({
classNames: ['user-menu'],
@ -69,6 +70,9 @@ export default Ember.Component.extend({
Discourse.ajax("/users/toggle-anon", {method: 'POST'}).then(function(){
window.location.reload();
});
},
logout() {
User.logout();
}
}
});