meteor/accounts-password/password_server.js
function (user) {
  if (user.id)
    return {_id: user.id};
  else if (user.username)
    return {username: user.username};
  else if (user.email)
    return {"emails.address": user.email};
  throw new Error("shouldn't happen (validation missed something)");
}
function (user) {
  if (user.id)
    return {_id: user.id};
  else if (user.username)
    return {username: user.username};
  else if (user.email)
    return {"emails.address": user.email};
  throw new Error("shouldn't happen (validation missed something)");
}
function ( user ) { if ( user . id ) return { _id : user . id } ; else if ( user . username ) return { username : user . username } ; else if ( user . email ) return { "emails.address" : user . email } ; throw new Error ( "shouldn't happen (validation missed something)" ) ; }
Users can specify various keys to identify themselves with. @param user {Object} with one of `id`, `username`, or `email`. @returns A selector to pass to mongo to get the user record.
Users can specify various keys to identify themselves with .