A bit of explanation here. NodeBB was not originally designed for mongodb, thus does not use mongo collections. Every object is stored in one large "objects" collection, and is indexed by a unique string stored in the _key
field. For user objects this key is user:UID
, where UID is the user's identifier.
If you wanted to look up just the password field (the password hash), you can use query projection as such:
db.objects.find({_key:"user:1"}, {password: true, _id: false})
and you can add other fields as such:
db.objects.find({_key:"user:1"}, {password: true, uid: true, email: true, username: true, _id: false})