I'm using Meteor's accounts-ui. Is there a way to check if the user is logged in on the template without writing custom helper code?
Pseudo code:
{{#if userIsLoggedIn }}
You're logged in
{{/if}}
If not, what's the cleanest, most idiomatic way of doing it?
I only care about client-side here.
Thanks.
Simple answer: check if the currentUser
object exists.
{{#if currentUser }}
You're logged in
{{/if}}
Yes, it is a default helper, no need to write anything else!