From 28b42031be26e959ff042fdf6fc58ca0c66ccb40 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 5 Oct 2017 00:24:38 +0200 Subject: [PATCH] login: log authenticated user in apache note Allows user names to be logged instead of %u using LogFormat "%{user}n". --- auth.inc.php | 2 ++ 1 file changed, 2 insertions(+) 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', -- 2.30.0