Removed ip from connected user list
This commit is contained in:
parent
bc74565662
commit
69c33b45fa
|
@ -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] = '<a href="index.php?sec=gusuarios&sec2=godmode/users/configure_user&id='.$row['id_user'].'">'.$row['id_user'].'</a>';
|
||||
$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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue