diff --git a/modules/users/web/web_nodes/user_logout_web_page.cpp b/modules/users/web/web_nodes/user_logout_web_page.cpp index ef4403578..4dc1a7cc3 100644 --- a/modules/users/web/web_nodes/user_logout_web_page.cpp +++ b/modules/users/web/web_nodes/user_logout_web_page.cpp @@ -14,7 +14,11 @@ #include "modules/web/http/web_server_cookie.h" #include "modules/web/http/web_server_request.h" -void UserLogoutWebPage::handle_logout_request(Ref &user, Ref request) { +void UserLogoutWebPage::_render_index(Ref request) { + Ref user = request->get_meta("user"); + + ERR_FAIL_COND(!user.is_valid()); + request->response_remove_cookie_simple("session_id"); user->save(); diff --git a/modules/users/web/web_nodes/user_logout_web_page.h b/modules/users/web/web_nodes/user_logout_web_page.h index 1f87572cf..4b13455a0 100644 --- a/modules/users/web/web_nodes/user_logout_web_page.h +++ b/modules/users/web/web_nodes/user_logout_web_page.h @@ -15,7 +15,7 @@ class UserLogoutWebPage : public UserWebPage { GDCLASS(UserLogoutWebPage, UserWebPage); public: - virtual void handle_logout_request(Ref &user, Ref request); + void _render_index(Ref request); UserLogoutWebPage(); ~UserLogoutWebPage();