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

#1

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?

#2

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
#3

Super simple, thanks!

#4

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

2 Likes
#5

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
#6

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

1 Like
#7

Couldn’t get it to work

TypeError: Cannot read property ‘collectionViews’ of undefined