I have something like this:
user = {
password: passwordVar,
email: emailVar,
profile: {
cityLong: cityLong,
cityShort: cityShort,
vendor: true,
vendorVerified: false
}
}
Accounts.createUser(user, function (error, result) {
});
So I have vendors signing up, which is vendor: true and then I have normal users which are vendor: false.
When I have vendors signing up I also want to add a document to a collection. I have no idea how to do that. With createUser I cannot get the ID of the user immediately but I want to attach the userID to my document.
With onCreateUser I cannot get the users profile immdeiately it seems. I also cannot get those information with a session or based on the route since both don’t work on the server. How can I solve the issue? I’m going crazy