From f2348a482604595f18a11740d70c0cd587f9336c Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Wed, 5 Jul 2000 18:02:42 +0000 Subject: [PATCH] When using HTTP auth from PHP, fill in the %u custom log field so the authenticated used id will get logged in the Apache access_log @- When using HTTP auth from PHP, fill in the %u custom log field so the @ authenticated used id will get logged in the Apache access_log (Rasmus) --- sapi/apache/mod_php4.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index eb21b675c7..774769eb04 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -399,6 +399,8 @@ static void init_request_info(SLS_D) tmp = uudecode(r->pool, authorization); SG(request_info).auth_user = getword_nulls_nc(r->pool, &tmp, ':'); if (SG(request_info).auth_user) { + r->connection->user = pstrdup(r->connection->pool,SG(request_info).auth_user); + r->connection->ap_auth_type = "Basic"; SG(request_info).auth_user = estrdup(SG(request_info).auth_user); } SG(request_info).auth_password = tmp; -- 2.50.1