From 5660804ef793e57551fd516f1e68f24ea4ff6fa1 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Tue, 12 May 2020 16:37:35 +0200 Subject: [PATCH] LSauth: replace LSdebug by LSlog logger --- src/includes/class/class.LSauth.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/includes/class/class.LSauth.php b/src/includes/class/class.LSauth.php index a48a5c42..18078608 100644 --- a/src/includes/class/class.LSauth.php +++ b/src/includes/class/class.LSauth.php @@ -20,6 +20,8 @@ ******************************************************************************/ +LSsession :: loadLSclass('LSlog_staticLoggerClass'); + /** * Gestion de l'authentification d'un utilisateur * @@ -27,7 +29,7 @@ * * @author Benjamin Renard */ -class LSauth { +class LSauth extends LSlog_staticLoggerClass { static private $authData=NULL; static private $authObject=NULL; @@ -41,26 +43,26 @@ class LSauth { ); public static function start() { - LSdebug('LSauth :: start()'); + self :: log_debug('start()'); // Load Config if (isset(LSsession :: $ldapServer['LSauth']) && is_array(LSsession :: $ldapServer['LSauth'])) { self :: $config = LSsession :: $ldapServer['LSauth']; } if (!LSsession :: loadLSclass('LSauthMethod')) { - LSdebug('LSauth :: Failed to load LSauthMethod'); + self :: log_debug('Failed to load LSauthMethod class'); return; } if (!isset(self :: $config['method'])) { self :: $config['method']='basic'; } $class='LSauthMethod_'.self :: $config['method']; - LSdebug('LSauth : provider -> '.$class); + self :: log_debug('provider -> '.$class); if (LSsession :: loadLSclass($class)) { self :: $provider = new $class(); if (!self :: $provider) { LSerror :: addErrorCode('LSauth_05',self :: $config['method']); } - LSdebug('LSauth : Provider Started !'); + self :: log_debug('Provider Started !'); return true; } else { @@ -70,7 +72,7 @@ class LSauth { } public static function forceAuthentication() { - LSdebug('LSauth :: forceAuthentication()'); + self :: log_debug('LSauth :: forceAuthentication()'); if (!is_null(self :: $provider)) { self :: $authData = self :: $provider -> getAuthData(); if (self :: $authData) { @@ -78,7 +80,7 @@ class LSauth { return self :: $authObject; } // No data : user has not filled the login form - LSdebug('LSauth : No data -> user has not filled the login form'); + self :: log_debug('No data -> user has not filled the login form'); return; } LSerror :: addErrorCode('LSauth_06');