Checking if a field in any user document exists


How can I check if a field exists in any users fields?

For now im setting the following on the client during a signin flow:

Meteor.users.update(Meteor.user()._id, {$set: {'': ''}}, func(){}

I just need to do a simple check on the server if exists in any users field. How can I do that?


Meteor.users.find({'': ''})

// also you can do text search since it may be case
// sensitive. 

Meteor.users.find({'': {$text: ''}})

Also {fieldName: {$exists: true/false }) if you want to get any empty/filled users to see if unset on any. 

See mongodb $text operator and regex options docs