Added accounts page

This commit is contained in:
Stefan Zermatten
2018-10-05 12:55:21 +02:00
parent d0ce162315
commit 89820780b5
7 changed files with 192 additions and 12 deletions

View File

@@ -102,4 +102,10 @@ if (Meteor.isServer) Meteor.methods({
var apiKey = Random.id(30);
Meteor.users.update(this.userId, {$set: {apiKey}});
},
sendVerificationEmail(address) {
var user = Meteor.users.findOne(this.userId);
if (!user) return;
if (!_.some(user.emails, email => email.address === address)) return;
Accounts.sendVerificationEmail(this.userId, address);
},
});