Reputation: 357
In my project I need to call a callback function on User -> Sign out in order to set as 'null' a Session value.
Is there a way to override Meteor.logout()
behavior?
How to provide that callback function?
Thanks
Upvotes: 8
Views: 11672
Reputation: 604
Meteor.logout() has a callback function.
http://docs.meteor.com/#meteor_logout
Meteor.logout(function(err) {
// callback
Session.set("ses",false);
});
--
Template.tplName.events
"click #logout": (e, tmpl) ->
Meteor.logout ->
Session.set "ses", false
Upvotes: 22