docs: function (req, res, next) {
    let adminPostRoute = res.locals.adminPostRoute || 'auth';
    req.adminPostRoute = res.locals.adminPostRoute || 'auth';
  	// console.log('res.locals.adminPostRoute',res.locals.adminPostRoute);
  	// console.log('req.adminPostRoute',req.adminPostRoute);
    var arr = [
      function (cb) {
        cb(null, req, res, next);
      },
      getUser,
      generateToken,
      emailForgotPasswordLink,
    ];
  
    waterfall(arr,
  		function (err, results) {
    if (periodic.app.controller.extension.reactadmin) {
      if (err) {
        logger.debug('could not send reset email', err);
      }
      return res.status(200).send({
        result:'success',
        data: 'Password reset instructions were sent to your email address',
      });
    } else { 
      CoreController.respondInKind({
        req: req,
        res: res,
        err: err,
        responseData: results,
        callback: function (req, res /*,responseData*/) {
          if (err) {
  						
  
            req.flash('error', err.message);
            res.redirect('/auth/forgot');
  						
          } else {
            req.flash('info', 'Password reset instructions were sent to your email address');
            if (req.controllerData && req.controllerData.sendemailstatus) {
              req.controllerData.password_reset_emailstatus = results;
              next();
            }							else {
              res.redirect(loginExtSettings.settings.authLoginPath);
            }
          }
        },
      });
    }
  });
  }