From 45bb7728594deefe2b1e3ded5fdae94e22536090 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 5 Aug 2021 20:03:01 +0200 Subject: [PATCH] Save the user object after login. --- modules/users/user.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/users/user.cpp b/modules/users/user.cpp index 6a8acf5..3cf9a81 100644 --- a/modules/users/user.cpp +++ b/modules/users/user.cpp @@ -143,6 +143,7 @@ void User::handle_login_request_default(Request *request) { session->add_object("user", user); user->sessions.push_back(session->session_id); + user->save(); request->add_cookie(::Cookie("session_id", session->session_id));