Files
meteor/examples/localmarket/server/users.js
Nick Martin 848180b0f7 New example.
2014-10-27 21:55:09 -07:00

10 lines
266 B
JavaScript

Accounts.onCreateUser(function(options, user) {
if (options.profile)
user.profile = options.profile;
// If this is the first user going into the database, make them an admin
if (Meteor.users.find().count() === 0)
user.admin = true;
return user;
});