From 57c85500b3ab67079ee5e57701d72558d0f0dbb5 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 18 Dec 2012 14:43:33 +0000 Subject: [PATCH] 2012-12-18 Miguel de Dios * include/functions_config.php: fixed check if it set the id_user in the session. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7302 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/include/functions_config.php | 12 +++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index ad3670906f..edca0358b2 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2012-12-18 Miguel de Dios + + * include/functions_config.php: fixed check if it set the id_user + in the session. + + + 2012-12-18 Sergio Martin * operation/events/events_list.php diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 2d404abe13..40e9a912ac 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -317,11 +317,13 @@ function config_process_config () { global $config; //Check if the user have the admin flag. - $is_admin = (bool)db_get_value('is_admin', - 'tusuario', 'id_user', $_SESSION['id_usuario']); - if (!$is_admin) { - return false; - exit; + if (isset($_SESSION['id_usuario'])) { + $is_admin = (bool)db_get_value('is_admin', + 'tusuario', 'id_user', $_SESSION['id_usuario']); + if (!$is_admin) { + return false; + exit; + } } $configs = db_get_all_rows_in_table ('tconfig');