server/services/authService.js
// Orders password renewal email for accounts registered with the specified email address
Orders password renewal email for accounts registered with the specified email address
Orders password renewal email for accounts registered with the specified email address
static orderPasswordRenewal(email) {
    return new Promise((resolve, reject) => {
      User.find({ email: email, active: true }).then((users) => {
        if (users && users.length > 0) {
          users.forEach((user) => {
            const token = AuthService.generateForgotPasswordToken(user.username).token;
            EmailService.sendPasswordRenewEmail(user.email, user.username, token);
          });
          return resolve();
        }
        return reject();
      });
    });
  }
static orderPasswordRenewal ( email ) { return new Promise ( ( resolve , reject ) => { User . find ( { email : email , active : true } ) . then ( ( users ) => { if ( users && users . length > 0 ) { users . forEach ( ( user ) => { const token = AuthService . generateForgotPasswordToken ( user . username ) . token ; EmailService . sendPasswordRenewEmail ( user . email , user . username , token ) ; } ) ; return resolve ( ) ; } return reject ( ) ; } ) ; } ) ; }
Orders password renewal email for accounts registered with the specified email address
Orders password renewal email for accounts registered with the specified email address