From aedeae454d6d66feb5e1f04e60a2c2bd83cb1c5e Mon Sep 17 00:00:00 2001 From: Tim Fry Date: Tue, 1 Apr 2025 11:35:56 -0300 Subject: [PATCH] Fix plugin class name mismatch in auto loader When matching the file name of the plugins in the authentication plugin folder they do not match. This causes auto loader not to find and load the class. --- resources/classes/auto_loader.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/classes/auto_loader.php b/resources/classes/auto_loader.php index fdd2fa1a75..046adf64f2 100644 --- a/resources/classes/auto_loader.php +++ b/resources/classes/auto_loader.php @@ -134,6 +134,10 @@ class auto_loader { $search_path[] = glob($project_path . "/*/*/resources/interfaces/" . $class_name . ".php"); $search_path[] = glob($project_path . "/*/*/resources/traits/" . $class_name . ".php"); $search_path[] = glob($project_path . "/*/*/resources/classes/" . $class_name . ".php"); + //fix class names in the plugins directory prefixed with 'plugin_' + if (str_starts_with($class_name, 'plugin_')) { + $class_name = substr($class_name, 7); + } $search_path[] = glob($project_path . "/core/authentication/resources/classes/plugins/" . $class_name . ".php"); //collapse all entries to only the matched entry