From 69c33b45fa8441174979868be9576729ecc02baa Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Wed, 23 Dec 2020 14:33:20 +0100 Subject: [PATCH] Removed ip from connected user list --- .../extensions/users_connected.php | 36 ++----------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/pandora_console/extensions/users_connected.php b/pandora_console/extensions/users_connected.php index e26b0dab1e..054490a7f0 100644 --- a/pandora_console/extensions/users_connected.php +++ b/pandora_console/extensions/users_connected.php @@ -75,44 +75,13 @@ function users_extension_main_god($god=true) $table->head = []; $table->head[0] = __('User'); - $table->head[1] = __('IP'); - $table->head[2] = __('Date'); + $table->head[1] = __('Date'); $rowPair = true; $iterator = 0; // Get data foreach ($rows as $row) { - // Get ip_origin of the last login of the user - switch ($config['dbtype']) { - case 'mysql': - case 'postgresql': - $ip_origin = db_get_value_sql( - sprintf( - "SELECT ip_origen - FROM tsesion - WHERE id_usuario = '%s' - AND descripcion = '".io_safe_input('Logged in')."' - ORDER BY fecha DESC", - $row['id_user'] - ) - ); - break; - - case 'oracle': - $ip_origin = db_get_value_sql( - sprintf( - "SELECT ip_origen - FROM tsesion - WHERE id_usuario = '%s' - AND to_char(descripcion) = '".io_safe_input('Logged in')."' - ORDER BY fecha DESC", - $row['id_user'] - ) - ); - break; - } - if ($rowPair) { $table->rowclass[$iterator] = 'rowPair'; } else { @@ -124,8 +93,7 @@ function users_extension_main_god($god=true) $data = []; $data[0] = ''.$row['id_user'].''; - $data[1] = $ip_origin; - $data[2] = date($config['date_format'], $row['last_connect']); + $data[1] = date($config['date_format'], $row['last_connect']); array_push($table->data, $data); }