[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/02: Popup : check if user is still connect
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/02: Popup : check if user is still connected |
Date: |
Thu, 23 Mar 2017 15:25:44 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit c592f3f5e8188a9af11f461ff6eab59197e3fd7e
Author: Dany De Bontridder <address@hidden>
Date: Thu Mar 23 20:24:41 2017 +0100
Popup : check if user is still connected
---
html/popup.php | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/html/popup.php b/html/popup.php
index eda69a6..2ba3a0b 100644
--- a/html/popup.php
+++ b/html/popup.php
@@ -30,6 +30,17 @@ require_once NOALYSS_INCLUDE.'/class/class_periode.php';
html_page_start($_SESSION['g_theme']);
echo '<div style="float:left;">';
global $g_user;
+/*
+ * Check if the user is still connected
+ */
+if ( $g_user == null || ! isset ($_SESSION['g_user'] ) )
+{
+ echo "<h2>"._('Vous êtes déconnecté')."</h2>";
+ $backurl=$_SERVER['REQUEST_URI'];
+
$url="index.php?".http_build_query(array('reconnect'=>1,'backurl'=>urlencode($backurl)));
+ redirect($url);
+ exit();
+}
$g_user->Check();
$g_user->check_dossier(Dossier::id());