authentication : when debugging, save the logs in file
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3016 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user