diff --git a/authentication.php b/authentication.php index 5c9d301..c451038 100644 --- a/authentication.php +++ b/authentication.php @@ -29,7 +29,10 @@ class authentication /** The rest authentication methods. Can be http, session, post. Attention : session case = CSRF ! */ public $restMethods = array ("http"); - /** The html authentication methods. Can be http, session, post */ + /** The html authentication methods. Can be http, session, post + * The "post" is already used when using verifAuthLoginPage method (usually + * only in authentication page) + */ public $htmlMethods = array ("session"); /** The authentication methods. Can be ldap, sympa...*/ public $authMethods = array (); @@ -346,8 +349,8 @@ class authentication */ private function logging ($priority, $message) { - if ($priority > 4) + if ($this->debug === 0 && $priority > 4) return; - echo "$priority : $message\n"; + file_put_contents ("/tmp/auth.log", "$priority : $message\n", FILE_APPEND); } }