Save the user object after login.

This commit is contained in:
Relintai 2021-08-05 20:03:01 +02:00
parent 17498aaf1d
commit 45bb772859

View File

@ -143,6 +143,7 @@ void User::handle_login_request_default(Request *request) {
session->add_object("user", user); session->add_object("user", user);
user->sessions.push_back(session->session_id); user->sessions.push_back(session->session_id);
user->save();
request->add_cookie(::Cookie("session_id", session->session_id)); request->add_cookie(::Cookie("session_id", session->session_id));