I'm using the Meteor useraccounts package and have setup some custom fields
AccountsTemplates.addFields([
{
_id: 'email',
type: 'email',
required: true,
displayName: "email",
re: /.+@(.+){2,}\.(.+){2,}/,
errStr: 'Invalid email'
},
{
_id: 'firstName',
type: 'text',
displayName: "First Name",
required: true
},
{
_id: 'lastName',
type: 'text',
displayName: "Last Name",
required: true
},
pwd
]);
I'm trying to access the data on user sign up, IE Accounts.onCreateUser function but noting is working, trying to save the first and last name under profile.
// Name
options.profile.firstName = this.firstName;
options.profile.lastName = this.lastName;
user.profile = options.profile;