Hello, something in my brain is not clicking when it comes to creating a new user with Autoform. I’m hoping someone can help make it click.
First, the packages used by my app (via meteor list
):
accounts-password 1.1.1
accounts-ui 1.1.5
aldeed:autoform 5.3.2
aldeed:collection2 2.3.3
iron:router 1.0.7
meteor-platform 1.2.2
twbs:bootstrap 3.3.4
Second, my schema in /lib/collections.js
Schema.UserProfile = new SimpleSchema({
firstName: {
type: String,
regEx: /^[a-zA-Z-]{2,25}$/,
optional: false
},
lastName: {
type: String,
regEx: /^[a-zA-Z]{2,25}$/,
optional: false
}
});
Schema.User = new SimpleSchema({
username: {
type: String,
regEx: /^[a-z0-9A-Z_]{3,15}$/
},
emails: {
type: [Object],
optional: false
},
"emails.$.address": {
type: String,
regEx: SimpleSchema.RegEx.Email
},
"emails.$.verified": {
type: Boolean
},
profile: {
type: Schema.UserProfile,
optional: false
},
status: {
type: String,
optional: false
}
});
Meteor.users.attachSchema(Schema.User);
So, it appears Accounts.createUser() only accepts username, email, password
, and profile
. The problem is, I need to also include status
, as described in the schema above. What’s a Meteor newbie to do? Should I include status in profile? According to the Meteor docs, that isn’t encouraged: “do not store anything on profile that you wouldn’t want the user to edit”.
Please enlighten me