]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - plugins/sql_auth/sql_auth.php
Log a user out if their account no longer exists
[irc/unrealircd/unrealircd-webpanel.git] / 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()