From b24e54e3bfb51deb05141e6662373eca4d2538d5 Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Wed, 2 Oct 2013 22:12:24 -0700 Subject: [PATCH] accounts-ui not dependent on global {{currentUser}} handler Specifically, we don't have an API for defining global handlers right now (the old Handlebars.registerHelper). We still need to devise a new pattern for this but in the meanwhile, this is a step towards getting accounts-ui to work. --- packages/accounts-ui-unstyled/login_buttons.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/accounts-ui-unstyled/login_buttons.js b/packages/accounts-ui-unstyled/login_buttons.js index d173faaeb1..dd7479b1b5 100644 --- a/packages/accounts-ui-unstyled/login_buttons.js +++ b/packages/accounts-ui-unstyled/login_buttons.js @@ -10,6 +10,10 @@ Handlebars.registerHelper( return new Handlebars.SafeString(Template._loginButtons({align: "left"})); }); +Template._loginButtons.currentUser = function () { + return Meteor.userId(); +}; + // shared between dropdown and single mode Template._loginButtons.events({ 'click #login-buttons-logout': function() {