lib/controllers/forgot-password.js
function (form) {
            var data = {
              email: form.data.email
            };

            if (req.organization) {
              data.accountStore = {
                href: req.organization.href
              };
            }

            application.sendPasswordResetEmail(data, function (err) {
              if (err) {
                logger.info('A user tried to reset their password, but supplied an invalid email address: ' + form.data.email + '.');
              }

              res.redirect(config.web.forgotPassword.nextUri);
            });
          }
function (form) {
            var data = {
              email: form.data.email
            };

            if (req.organization) {
              data.accountStore = {
                href: req.organization.href
              };
            }

            application.sendPasswordResetEmail(data, function (err) {
              if (err) {
                logger.info('A user tried to reset their password, but supplied an invalid email address: ' + form.data.email + '.');
              }

              res.redirect(config.web.forgotPassword.nextUri);
            });
          }
function ( form ) { var data = { email : form . data . email } ; if ( req . organization ) { data . accountStore = { href : req . organization . href } ; } application . sendPasswordResetEmail ( data , function ( err ) { if ( err ) { logger . info ( 'A user tried to reset their password, but supplied an invalid email address: ' + form . data . email + '.' ) ; } res . redirect ( config . web . forgotPassword . nextUri ) ; } ) ; }
If we get here, it means the user is submitting a password reset request, so we should attempt to send the user a password reset email.
If we get here it means the user is submitting a password reset request so we should attempt to send the user a password reset email .