mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-23 17:47:17 +01:00
Reimplemented UserLogoutWebPage.
This commit is contained in:
parent
299f714ed9
commit
ae36b35436
@ -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> &user, Ref<WebServerRequest> request) {
|
||||
void UserLogoutWebPage::_render_index(Ref<WebServerRequest> request) {
|
||||
Ref<User> user = request->get_meta("user");
|
||||
|
||||
ERR_FAIL_COND(!user.is_valid());
|
||||
|
||||
request->response_remove_cookie_simple("session_id");
|
||||
|
||||
user->save();
|
||||
|
@ -15,7 +15,7 @@ class UserLogoutWebPage : public UserWebPage {
|
||||
GDCLASS(UserLogoutWebPage, UserWebPage);
|
||||
|
||||
public:
|
||||
virtual void handle_logout_request(Ref<User> &user, Ref<WebServerRequest> request);
|
||||
void _render_index(Ref<WebServerRequest> request);
|
||||
|
||||
UserLogoutWebPage();
|
||||
~UserLogoutWebPage();
|
||||
|
Loading…
Reference in New Issue
Block a user