I would like to use find
to return a user based on an email address.
Something in the lines of:
Meteor.users.find({emails : [address : '[email protected]']} ).fetch()
It didn't work, how can I retrieve a user this way?
You can use this query :
function findByEmail(email){
var user = Meteor.users.find({
"emails.address": email
}).fetch();
return user;
}
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加