From: Mischa POSLAWSKY Date: Wed, 4 Oct 2017 22:24:38 +0000 (+0200) Subject: login: log authenticated user in apache note X-Git-Tag: v2.4~7 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/28b42031be26e959ff042fdf6fc58ca0c66ccb40 login: log authenticated user in apache note Allows user names to be logged instead of %u using LogFormat "%{user}n". --- diff --git a/auth.inc.php b/auth.inc.php index e849da9..ef80ecd 100644 --- a/auth.inc.php +++ b/auth.inc.php @@ -21,6 +21,8 @@ function login($inuser, $inpass = NULL) if ($inauth !== $authhash) return; } + if (function_exists('apache_note')) apache_note('user', $inuser); + return [ 'name' => $inuser, 'admin' => !empty($inuser) && strtolower($inuser) != 'lid',