mirror of
https://github.com/Relintai/mourne_rcpp_fw.git
synced 2024-12-23 21:16:50 +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"
|
||||
|
||||
bool MourneApplication::is_logged_in(Request *request) {
|
||||
if (!request->session) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Ref<User> u = request->reference_data["user"];
|
||||
|
||||
return u.is_valid();
|
||||
|
Loading…
Reference in New Issue
Block a user