Blame view
imports/server/accounts/creation.js
771 Bytes
ff976df49
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import _ from 'lodash'; import { Accounts } from 'meteor/accounts-base'; import { SimpleSchema } from 'meteor/aldeed:simple-schema'; import { ValidatedMethod } from 'meteor/mdg:validated-method'; import { Orgs } from '/imports/collections/orgs/index'; import { Users } from '/imports/collections/users/index'; Accounts.validateNewUser((user) => { return !!user; }); Accounts.onCreateUser((options, user) => { |
ff976df49
|
15 16 17 18 19 20 21 22 23 |
_.assign(user, { firstName: options.profile.firstName, lastName: options.profile.lastName, phones: [], identities: [], createdAt: new Date().getTime(), }); return user; }); |