]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Log a user out if their account no longer exists
authorValerie Pond <redacted>
Thu, 19 Jan 2023 09:46:22 +0000 (09:46 +0000)
committerValerie Pond <redacted>
Thu, 19 Jan 2023 09:46:22 +0000 (09:46 +0000)
plugins/sql_auth/sql_auth.php

index 62d59bd6062039113a2d9da35de36747fbb1a9c3..44ab3f72f2f571bd66e4014b30d715ddca0ea922 100644 (file)
@@ -45,6 +45,15 @@ class sql_auth
                {
                        header("Location: ".BASE_URL."plugins/sql_auth/login.php");
                }
+               else
+               {
+                       $user = new SQLA_User(NULL, $_SESSION['id']);
+                       if (!$user->id)
+                       {
+                               session_destroy();
+                               header("Location: ".BASE_URL."plugins/sql_auth/login.php");
+                       }
+               }
        }
 
        public static function create_tables()