Check whether the session is set in is_logged_in.

This commit is contained in:
Relintai 2021-10-31 10:19:23 +01:00
parent 050e9bf0d0
commit 0f7f337517

View File

@ -18,6 +18,10 @@
#include "modules/users/user_controller.h"
bool MourneApplication::is_logged_in(Request *request) {
if (!request->session) {
return false;
}
Ref<User> u = request->reference_data["user"];
return u.is_valid();