Просмотр исходного кода

Throw error message to signed in user if account is deleted

Kristan Kenney 5 лет назад
Родитель
Сommit
2e0c4dcb03
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      web/inc/main.php

+ 3 - 1
web/inc/main.php

@@ -146,7 +146,9 @@ function top_panel($user, $TAB) {
     $command = HESTIA_CMD."v-list-user ".escapeshellarg($user)." 'json'";
     exec ($command, $output, $return_var);
     if ( $return_var > 0 ) {
-        header("Location: /logout/");
+        echo "<b>ERROR: Unable to retrieve account details.</b><br>Please log in again.";
+        session_destroy();
+        header("Location: /login/");
         exit;
     }
     $panel = json_decode(implode('', $output), true);