vicinityManager/server/services/login/login.js
/*
Recover password - Sends link to the provided mail
The link provided redirects to updatePwd function in this same module
*/
Recover password - Sends link to the provided mail
The link provided redirects to updatePwd function in this same module
Recover password - Sends link to the provided mail The link provided redirects to updatePwd function in this same module
function findMail(userName, callback){
  userOp.findOne({ email: userName })
  .then(function(result){
    var mailInfo = {
      link : "http://vicinity.bavenir.eu/#/authentication/recoverPassword/" + result._id,
      emailTo : result.email,
      subject : 'Password recovery email VICINITY',
      tmpName :'recoverPwd',
      name : result.name
    };
    return mailing.sendMail(mailInfo);
  })
  .then(function(response){
    callback(false, response);
  })
  .catch(function(err){
    callback(true, err);
  });
}
function findMail ( userName , callback ) { userOp . findOne ( { email : userName } ) . then ( function ( result ) { var mailInfo = { link : "http://vicinity.bavenir.eu/#/authentication/recoverPassword/" + result . _id , emailTo : result . email , subject : 'Password recovery email VICINITY' , tmpName : 'recoverPwd' , name : result . name } ; return mailing . sendMail ( mailInfo ) ; } ) . then ( function ( response ) { callback ( false , response ) ; } ) . catch ( function ( err ) { callback ( true , err ) ; } ) ; }
Recover password - Sends link to the provided mail
The link provided redirects to updatePwd function in this same module
Recover password - Sends link to the provided mail The link provided redirects to updatePwd function in this same module