From: Rasmus Lerdorf Date: Wed, 5 Jul 2000 18:02:42 +0000 (+0000) Subject: When using HTTP auth from PHP, fill in the %u custom log field so the X-Git-Tag: PRE_METHOD_CALL_SEPERATE_FIX_PATCH~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2348a482604595f18a11740d70c0cd587f9336c;p=php 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) --- 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;