I’d like to disable the automatic creation of the profile field for my user accounts. How can I achieve this?
The basic profile
object is added by the accounts
family of packages and can’t (currently) be disabled.
What is your requirement: could you just choose to not publish profile
if you don’t want it visible on the client?
Probably want to use the Accounts.onCreateUser((opt, usr) => {})
function. Load it on the server. https://docs.meteor.com/api/accounts-multi.html#AccountsServer-onCreateUser
Cunning! I like that solution.
@energistic is right.
And you just need comment the part below:
Accounts.onCreateUser((options, user) => {
// if (options.profile) {
// user.profile = options.profile;
// }
return user;
});
@robfallows @energistic @Hongbo_Miao thanks for the replies!
Hm. Even after implementing your solutions my schema keeps throwing errors at me as if profile is still present, which is totally odd.
Edit: it’s a problem with simple-schema, not Meteor directly. Thanks again!