From 88319b6204f7f239d11f71035b014d37c2a3e934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Oudin?= <oudin@crans.org> Date: Mon, 3 Jun 2019 12:21:07 +0200 Subject: [PATCH] If not connected, do not allow access to the piplome --- app/controller/cron.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controller/cron.php b/app/controller/cron.php index 48a900f..4591c05 100644 --- a/app/controller/cron.php +++ b/app/controller/cron.php @@ -22,6 +22,9 @@ class Cron extends Controller { // This method is used to generate a piplome. It might be called with an // id parameters, in which case we will ask to regenerate a specific piplome. + if (!$f3->exists('SESSION.user')) { + $f3->reroute('/login'); + } $logger = new \Log("/piplome.log"); $ids = array(); $db = $f3->get('DB'); -- GitLab