From afb899c003b34121e4b4285bd6da5ca60d6096c3 Mon Sep 17 00:00:00 2001 From: osaajani Date: Sat, 9 Nov 2019 03:38:20 +0100 Subject: [PATCH] add redirect to dashboard if already logged --- controllers/publics/Connect.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/controllers/publics/Connect.php b/controllers/publics/Connect.php index 9861d13..71c5542 100755 --- a/controllers/publics/Connect.php +++ b/controllers/publics/Connect.php @@ -36,7 +36,12 @@ namespace controllers\publics; */ public function login() { - $this->render('connect/login'); + if ($_SESSION['connect'] ?? false) + { + return $this->redirect(\descartes\Router::url('Dashboard', 'show')); + } + + return $this->render('connect/login'); } /**