diff --git a/modules/users/web/web_nodes/user_controller.cpp b/modules/users/web/web_nodes/user_controller.cpp index 4e8dd0913..864e7d558 100644 --- a/modules/users/web/web_nodes/user_controller.cpp +++ b/modules/users/web/web_nodes/user_controller.cpp @@ -793,28 +793,3 @@ FormValidator *UserController::_profile_validator = nullptr; String UserController::_path = "./"; String UserController::_table_name = "users"; - -// returnring true means handled, false means continue -bool UserSessionSetupMiddleware::on_before_handle_request_main(Request *request) { - if (request->session.is_valid()) { - int user_id = request->session->get_int("user_id"); - - if (user_id != 0) { - Ref u = UserController::get_singleton()->db_get_user(user_id); - - if (u.is_valid()) { - request->reference_data["user"] = u; - } else { - // log - request->session->remove("user_id"); - } - } - } - - return false; -} - -UserSessionSetupMiddleware::UserSessionSetupMiddleware() { -} -UserSessionSetupMiddleware::~UserSessionSetupMiddleware() { -} diff --git a/modules/users/web/web_nodes/user_controller.h b/modules/users/web/web_nodes/user_controller.h index f421c0a00..e016c977b 100644 --- a/modules/users/web/web_nodes/user_controller.h +++ b/modules/users/web/web_nodes/user_controller.h @@ -122,16 +122,4 @@ protected: static String _table_name; }; -// just session setup -class UserSessionSetupMiddleware : public Middleware { - RCPP_OBJECT(UserSessionSetupMiddleware, Middleware); - -public: - //returnring true means handled, false means continue - bool on_before_handle_request_main(Request *request); - - UserSessionSetupMiddleware(); - ~UserSessionSetupMiddleware(); -}; - #endif