login: log authenticated user in apache note
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 4 Oct 2017 22:24:38 +0000 (00:24 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 4 Oct 2017 22:26:32 +0000 (00:26 +0200)
Allows user names to be logged instead of %u using LogFormat "%{user}n".

auth.inc.php

index e849da9b997957c7fc81a2cfb2266f86baeb2230..ef80ecdab5533200649183c81cc618c554eea2d2 100644 (file)
@@ -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',