fixed errors in session with send mail alerts graph API

This commit is contained in:
daniel 2018-11-21 15:16:52 +01:00
parent 494b858a20
commit a3aa84bf92
4 changed files with 8 additions and 10 deletions

View File

@ -32,9 +32,7 @@ if (!$config["MR"]) {
echo '<a class="white_bold footer" target="_blank" href="' . $config["homeurl"] . $license_file. '">'; echo '<a class="white_bold footer" target="_blank" href="' . $config["homeurl"] . $license_file. '">';
if(enterprise_installed()){ include_once ($config["homedir"]."/include/functions_update_manager.php");
enterprise_include_once("../include/functions_update_manager.php");
}
$current_package = update_manager_get_current_package(); $current_package = update_manager_get_current_package();

View File

@ -215,6 +215,7 @@ if ($delete_action) {
__('Could not be deleted')); __('Could not be deleted'));
} }
$table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'databox data';
$table->data = array (); $table->data = array ();

View File

@ -72,10 +72,14 @@ switch($info) {
if (isInACL($ipOrigin)) { if (isInACL($ipOrigin)) {
if (empty($apiPassword) || (!empty($apiPassword) && $api_password === $apiPassword)) { if (empty($apiPassword) || (!empty($apiPassword) && $api_password === $apiPassword)) {
$user_in_db = process_user_login($user, $password, true); $user_in_db = process_user_login($user, $password, true);
if ($user_in_db !== false) { if ($user_in_db !== false) {
$config['id_user'] = $user_in_db; $config['id_user'] = $user_in_db;
$correctLogin = true; $correctLogin = true;
if (session_status() === PHP_SESSION_NONE) session_start();
$_SESSION["id_usuario"] = $user;
session_write_close();
} }
else { else {
$no_login_msg = "Incorrect user credentials"; $no_login_msg = "Incorrect user credentials";
@ -178,11 +182,6 @@ if ($correctLogin) {
returnError('no_exist_operation', $returnType); returnError('no_exist_operation', $returnType);
} }
} }
//XXXXX
if (file_exists(session_save_path() . DIRECTORY_SEPARATOR . "pansess_" . session_id())) {
unlink(session_save_path() . DIRECTORY_SEPARATOR . "pansess_" . session_id());
}
} }
else { else {
// TODO: Implement a new switch in config to enable / disable // TODO: Implement a new switch in config to enable / disable

View File

@ -176,7 +176,7 @@ date_default_timezone_set("Europe/Madrid");
////////////////////////////////////// //////////////////////////////////////
require_once ($config["homedir"].'/include/load_session.php'); require_once ($config["homedir"].'/include/load_session.php');
if (session_id() == '') session_start(); if (session_status() === PHP_SESSION_NONE) session_start();
config_process_config(); config_process_config();
config_prepare_session(); config_prepare_session();