Logout with timer

This commit is contained in:
guillaume 2018-11-06 17:48:12 +01:00
parent 8c497efb46
commit 3646a9c259
9 changed files with 83 additions and 3 deletions

View file

@ -80,6 +80,7 @@ Template.userFormsLayout.events({
const user = Users.findOne();
if (user && user.authenticationMethod === 'password') {
logoutWithTimer(user._id);
return this.stop();
}
@ -93,6 +94,7 @@ Template.userFormsLayout.events({
// Use the ldap connection package
Meteor.loginWithLDAP(email, password, function(error) {
if (!error) {
logoutWithTimer(user._id);
// Connection
return FlowRouter.go('/');
}