User logs fix failed

This commit is contained in:
FusionPBX
2024-10-10 16:21:03 -06:00
committed by GitHub
parent 949d407604
commit fc4f75f30c
3 changed files with 16 additions and 20 deletions
@@ -69,7 +69,7 @@ class plugin_database {
//check if already authorized
if (isset($_SESSION['authentication']['plugin']['database']) && $_SESSION['authentication']['plugin']['database']["authorized"]) {
return $_SESSION['authentication']['plugin']['database'];
return;
}
//show the authentication code view
@@ -325,18 +325,6 @@ class plugin_database {
}
}
else {
//clear authentication session
if (empty($_SESSION['authentication']['methods']) || !is_array($_SESSION['authentication']['methods'])) {
unset($_SESSION['authentication']);
}
// clear username
if (!empty($_REQUEST["password"])) {
unset($_SESSION['username'], $_REQUEST['username'], $_POST['username']);
unset($_SESSION['authentication']);
}
}
//result array
if ($valid_password) {
@@ -361,12 +349,7 @@ class plugin_database {
return $result ?? false;
}
else {
unset($_SESSION['username'], $_REQUEST['username'], $_POST['username']);
unset($_SESSION['authentication']);
}
return;
+6 -1
View File
@@ -259,7 +259,12 @@
foreach ($user_logs as $row) {
//check the session status
$session_file = 'sess_'.$row['session_id'];
$session_status = (!empty($row['session_id']) && file_exists($session_path.'/'.$session_file)) ? 'active' : 'inactive';
if (!empty($row['result']) && $row['result'] == 'success') {
$session_status = (!empty($row['session_id']) && file_exists($session_path.'/'.$session_file)) ? 'active' : 'inactive';
}
elseif (!empty($row['result']) && $row['result'] == 'failure') {
$session_status = 'failed';
}
echo "<tr class='list-row'>\n";
if (permission_exists('user_log_delete')) {