Accounts.sendResetPasswordEmail

Server Accounts.sendResetPasswordEmail(userId, [email]) import { Accounts } from 'meteor/accounts-base' Source Send an email with a link the user can use to reset their password. Arguments userId String The id of the user to send email to. email String Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

Accounts.sendEnrollmentEmail

Server Accounts.sendEnrollmentEmail(userId, [email]) import { Accounts } from 'meteor/accounts-base' Source Send an email with a link the user can use to set their initial password. Arguments userId String The id of the user to send email to. email String Optional. Which address of the user's to send the email to. This address must be in the user's emails list. Defaults to the first email in the list.

Accounts.resetPassword

Client Accounts.resetPassword(token, newPassword, [callback]) import { Accounts } from 'meteor/accounts-base' Source Reset the password for a user using a token received in email. Logs the user in afterwards. Arguments token String The token retrieved from the reset password URL. newPassword String A new password for the user. This is not sent in plain text over the wire. callback Function Optional callback. Called with no arguments on success, or with a single Error argument

Accounts.removeEmail

Server Accounts.removeEmail(userId, email) import { Accounts } from 'meteor/accounts-base' Source Remove an email address for a user. Use this instead of updating the database directly. Arguments userId String The ID of the user to update. email String The email address to remove.

Accounts.onResetPasswordLink

Client Accounts.onResetPasswordLink import { Accounts } from 'meteor/accounts-base' Source Register a function to call when a reset password link is clicked in an email sent by Accounts.sendResetPasswordEmail. This function should be called in top-level code, not inside Meteor.startup(). Arguments callback Function The function to call. It is given two arguments: token: A password reset token that can be passed to Accounts.resetPassword. done: A function to call when the password r

Accounts.onEnrollmentLink

Client Accounts.onEnrollmentLink import { Accounts } from 'meteor/accounts-base' Source Register a function to call when an account enrollment link is clicked in an email sent by Accounts.sendEnrollmentEmail. This function should be called in top-level code, not inside Meteor.startup(). Arguments callback Function The function to call. It is given two arguments: token: A password reset token that can be passed to Accounts.resetPassword to give the newly enrolled account a password.

Accounts.forgotPassword

Client Accounts.forgotPassword(options, [callback]) import { Accounts } from 'meteor/accounts-base' Source Request a forgot password email. Arguments callback Function Optional callback. Called with no arguments on success, or with a single Error argument on failure. Options email String The email address to send a password reset link.

Accounts.onEmailVerificationLink

Client Accounts.onEmailVerificationLink import { Accounts } from 'meteor/accounts-base' Source Register a function to call when an email verification link is clicked in an email sent by Accounts.sendVerificationEmail. This function should be called in top-level code, not inside Meteor.startup(). Arguments callback Function The function to call. It is given two arguments: token: An email verification token that can be passed to Accounts.verifyEmail. done: A function to call when the

Accounts.findUserByUsername

Server Accounts.findUserByUsername(username) import { Accounts } from 'meteor/accounts-base' Source Finds the user with the specified username. First tries to match username case sensitively; if that fails, it tries case insensitively; but if more than one user matches the case insensitive search, it returns null. Arguments username String The username to look for

Accounts.findUserByEmail

Server Accounts.findUserByEmail(email) import { Accounts } from 'meteor/accounts-base' Source Finds the user with the specified email. First tries to match email case sensitively; if that fails, it tries case insensitively; but if more than one user matches the case insensitive search, it returns null. Arguments email String The email address to look for