From 68659e834a386bf3169e7415c103b4073d2a2b0e Mon Sep 17 00:00:00 2001 From: cpradio Date: Mon, 31 Aug 2015 18:39:19 -0400 Subject: [PATCH] FIX: Fix the logout functionality in core --- app/assets/javascripts/discourse/components/user-menu.js.es6 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/discourse/components/user-menu.js.es6 b/app/assets/javascripts/discourse/components/user-menu.js.es6 index b99626795a1..ef89a63de81 100644 --- a/app/assets/javascripts/discourse/components/user-menu.js.es6 +++ b/app/assets/javascripts/discourse/components/user-menu.js.es6 @@ -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(); } } });