From 0f7f337517a5c7f6be46edc55e72ac975dc0bebf Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 31 Oct 2021 10:19:23 +0100 Subject: [PATCH] Check whether the session is set in is_logged_in. --- app/mourne_application.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/mourne_application.cpp b/app/mourne_application.cpp index be8b2d3..916a268 100644 --- a/app/mourne_application.cpp +++ b/app/mourne_application.cpp @@ -18,6 +18,10 @@ #include "modules/users/user_controller.h" bool MourneApplication::is_logged_in(Request *request) { + if (!request->session) { + return false; + } + Ref u = request->reference_data["user"]; return u.is_valid();