mirror of
https://github.com/Relintai/mourne_rcpp_fw.git
synced 2025-01-13 07:41:12 +01:00
Check whether the session is set in is_logged_in.
This commit is contained in:
parent
050e9bf0d0
commit
0f7f337517
@ -18,6 +18,10 @@
|
|||||||
#include "modules/users/user_controller.h"
|
#include "modules/users/user_controller.h"
|
||||||
|
|
||||||
bool MourneApplication::is_logged_in(Request *request) {
|
bool MourneApplication::is_logged_in(Request *request) {
|
||||||
|
if (!request->session) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Ref<User> u = request->reference_data["user"];
|
Ref<User> u = request->reference_data["user"];
|
||||||
|
|
||||||
return u.is_valid();
|
return u.is_valid();
|
||||||
|
Loading…
Reference in New Issue
Block a user