If you shouldn't profiles in Meteor Accounts, what should you use?

I need to add profile details to user accounts such as purchased package, name and country etc, if we shouldn’t use profile what should we use?

You can just add them directly to the user document or make a second collection to hold extra information about a user if you are particularly paranoid :slight_smile:

2 Likes

Super simple, thanks!

Shameless plug: https://atmospherejs.com/socialize/user-profile :yum:

2 Likes

One caveat regarding storing LOTS of custom user data in the Meteor.users collection: any server-side call to Meteor.user(), or Meteor.users.find/findOne() without a field specifier will result in the full user object being fetched from the DB to memory. If the db is remote then this can introduce extra latency and bandwidth usage.

There are many instances of Meteor.users.find/findOne() in Meteor core (see bug here) which will result in unnecessary data transfer.

If you’re only storing the odd field I wouldn’t worry about this, but if you’re storing lots of data then I would use a separate collection (until my bug is fixed :wink: )

1 Like

You can severely reduce trips to the DB on user info with @msavin’s userCache library

2 Likes

Couldn’t get it to work

TypeError: Cannot read property ‘collectionViews’ of undefined

Fixed :slight_smile:

1 Like