Meteor template: What's the simplest way to check if a user is logged in? -


i'm using meteor's accounts-ui. there way check if user logged in on template without writing custom helper code?

pseudo code:

{{#if userisloggedin }}     you're logged in {{/if}} 

if not, what's cleanest, idiomatic way of doing it?

i care client-side here.

thanks.

simple answer: check if currentuser object exists.

{{#if currentuser }}   you're logged in {{/if}} 

yes, default helper, no need write else!


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -