public function validateAction() { $fc = FrontController::getInstance(); $model = new UserTableModel(); $model->setTable('user'); if (empty($fc->getParams()['email']) && empty($fc->getParams()['key'])) { header('Location: /'); exit; } $model->setValidateUserData($fc->getParams()); if ($model->checkValidKey()) { $output = $model->render('../views/user/validate.php', 'withoutSliderAndSidebarAndFooter'); $fc->setPage($output); } else { Session::setMsg('Невозможно активировать данный аккаунт. Пожалуйста зарегистрируйтесь заново', 'warning'); header('Location: /user/login'); exit; } }