lib/controllers/verify-email.js
function (form) {
            var options = {
              login: form.data.email
            };

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

            application.resendVerificationEmail(options, function (err, account) {
              // Code 2016 means that an account does not exist for the given email
              // address.  We don't want to leak information about the account
              // list, so allow this continue without error.
              if (err && err.code !== 2016) {
                logger.info('A user tried to resend their account verification email, but failed: ' + err.message);
                return helpers.render(req, res, view, { error: err.message, form: form });
              }

              if (account) {
                emailVerificationHandler(new Account(account));
              }

              res.redirect(config.web.login.uri + '?status=unverified');
            });
          }
function (form) {
            var options = {
              login: form.data.email
            };

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

            application.resendVerificationEmail(options, function (err, account) {
              // Code 2016 means that an account does not exist for the given email
              // address.  We don't want to leak information about the account
              // list, so allow this continue without error.
              if (err && err.code !== 2016) {
                logger.info('A user tried to resend their account verification email, but failed: ' + err.message);
                return helpers.render(req, res, view, { error: err.message, form: form });
              }

              if (account) {
                emailVerificationHandler(new Account(account));
              }

              res.redirect(config.web.login.uri + '?status=unverified');
            });
          }
function ( form ) { var options = { login : form . data . email } ; if ( req . organization ) { options . accountStore = { href : req . organization . href } ; } application . resendVerificationEmail ( options , function ( err , account ) { // Code 2016 means that an account does not exist for the given email // address.  We don't want to leak information about the account // list, so allow this continue without error. if ( err && err . code !== 2016 ) { logger . info ( 'A user tried to resend their account verification email, but failed: ' + err . message ) ; return helpers . render ( req , res , view , { error : err . message , form : form } ) ; } if ( account ) { emailVerificationHandler ( new Account ( account ) ) ; } res . redirect ( config . web . login . uri + '?status=unverified' ) ; } ) ; }
If we get here, it means the user is submitting a request to resend their account verification email, so we should attempt to send the user another verification email.
If we get here it means the user is submitting a request to resend their account verification email so we should attempt to send the user another verification email .