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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With