Delete user feature

This commit is contained in:
guillaume 2019-04-26 17:53:48 +02:00
parent 11a91bfc78
commit cdef8a33e4
6 changed files with 62 additions and 2 deletions

View file

@ -53,7 +53,10 @@ template(name="editProfilePopup")
input.js-profile-email(type="email" value="{{emails.[0].address}}")
else
input.js-profile-email(type="email" value="{{emails.[0].address}}" readonly)
input.primary.wide(type="submit" value="{{_ 'save'}}")
div.buttonsContainer
input.primary.wide(type="submit" value="{{_ 'save'}}")
div
input#deleteButton.primary.wide(type="button" value="{{_ 'delete'}}")
template(name="changePasswordPopup")
+atForm(state='changePwd')

View file

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