Skip to content

Instantly share code, notes, and snippets.

@fritz-gerneth
Created March 4, 2013 01:32
Show Gist options
  • Save fritz-gerneth/5079319 to your computer and use it in GitHub Desktop.
Save fritz-gerneth/5079319 to your computer and use it in GitHub Desktop.
Handlebars.registerHelper('currentUserName', function () {
var user = Meteor.user();
if (_.isUndefined(user) || _.isNull(user)) {
return new Handlebars.SafeString("<i class='icon-spin icon-spinner'></i> Login");
}
return user.emails[0].address;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment