docs: function (form) {
              var viewData = {
                form: form,
                organization: req.organization
              };
              // The form library puts us in this error case if the form is empty,
              // which is true when you arrive on the form with a GET request.
              // This conditional allows us to control what we do in that situation
              if (form.data && !form.data.email) {
                client.getCurrentTenant(function (err, tenant) {
                  if (err) {
                    logger.info(err.message);
                    viewData.error = err.userMessage;
                    return helpers.render(req, res, view, viewData);
                  }
  
                  tenant.verifyAccountEmail(req.query.sptoken, function (err, account) {
                    if (err) {
                      logger.info(err.message);
                      viewData.invalid_sp_token = true;
                      return helpers.render(req, res, view, viewData);
                    }
  
                    client.getAccount(account.href, function (err) {
                      if (err) {
                        logger.info(err.message);
                        viewData.error = err.userMessage;
                        return helpers.render(req, res, view, viewData);
                      }
  
                      res.redirect(config.web.login.uri + '?status=verified');
                    });
                  });
                });
              } else {
                viewData.formErrors = helpers.collectFormErrors(form);
                helpers.render(req, res, view, viewData);
              }
            }