add popup to confirm deleting one account

This commit is contained in:
guillaume 2019-07-30 11:42:43 +02:00
parent 7cc1ffcab2
commit 84ba42f42e
4 changed files with 12 additions and 6 deletions

View file

@ -104,11 +104,11 @@ Template.editProfilePopup.events({
});
} else Popup.back();
},
'click #deleteButton'() {
Users.remove(Meteor.userId());
'click #deleteButton': Popup.afterConfirm('userDelete', function() {
Popup.close();
Users.remove(Meteor.userId());
AccountsTemplates.logout();
},
}),
});
// XXX For some reason the useraccounts autofocus isnt working in this case.