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

@@ -1,3 +1,6 @@
// TODO allow abilities to get disadvantage, making all skills that are based
// on them disadvantaged as well
import { ValidatedMethod } from 'meteor/mdg:validated-method';
const recomputeCharacter = new ValidatedMethod({

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);
},
});