Skip to content

Getting a session variable into Accounts.onCreateUser #5

@acomito

Description

@acomito

Background:

  • I collect information about a user's organization during my signup process.
  • I want this organization information to be inserted as a document into a collection of "organizations".
  • The schema for the organization includes the the user's id
  • I take the organization data from the forms and store it in a session variable-- this all works fine.

I'm wondering where the best place/time to insert this organization document as I need the user's Id to have been generated? I suppose I can just use a method call but where should I call the method from?

further explanation here:
https://forums.meteor.com/t/best-practice-for-sign-up-insert-doc-to-additional-collection/22806

It seems many people need this:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions