. */ namespace SP\Modules\Web\Controllers; use SP\Http\Request; use SP\Modules\Web\Controllers\Helpers\LayoutHelper; use SP\Util\ErrorUtil; /** * Class PassresetController * * @package SP\Modules\Web\Controllers */ class PassresetController extends ControllerBase { /** * Password reset action * * @throws \Psr\Container\ContainerExceptionInterface * @throws \Psr\Container\NotFoundExceptionInterface * @throws \SP\Core\Dic\ContainerException */ public function indexAction() { $LayoutHelper = $this->dic->get(LayoutHelper::class); $LayoutHelper->getPublicLayout('passreset', 'passreset'); if ($this->configData->isMailEnabled() || Request::analyze('f', 0) === 1) { $this->view->assign('login', Request::analyze('login')); $this->view->assign('email', Request::analyze('email')); $this->view->assign('action', Request::analyze('a')); $this->view->assign('hash', Request::analyze('h')); $this->view->assign('time', Request::analyze('t')); $this->view->assign('passReset', $this->view->action === 'passreset' && !empty($this->view->hash) && !empty($this->view->time)); } else { ErrorUtil::showErrorInView($this->view, self::ERR_UNAVAILABLE); } $this->view(); } }