--- ./svn-mod-auth-openid/mod_auth_openid.cpp	2007-08-03 20:08:35.000000000 +0000
+++ libapache2-mod-auth-openid-0.1~svn60/mod_auth_openid.cpp	2007-08-06 06:00:57.000000000 +0000
@@ -345,6 +345,8 @@
       if(valid_path == uri_path.substr(0, valid_path.size()) && apr_strnatcmp(session.hostname, r->hostname)==0) {
 	modauthopenid::debug("setting REMOTE_USER to \"" + std::string(session.identity) + "\"");
 	apr_table_setn(r->subprocess_env, "REMOTE_USER", std::string(session.identity).c_str());
+	modauthopenid::debug("setting r->user to \"" + std::string(session.identity) + "\"");
+	r->user =  apr_pstrdup(r->pool,std::string(session.identity).c_str());
 	return DECLINED;
       } else {
 	modauthopenid::debug("session found for different path or hostname");
@@ -440,6 +442,7 @@
       
       // if we're not setting cookie - don't redirect, just show page
       apr_table_setn(r->subprocess_env, "REMOTE_USER", identity.c_str());
+      r->user = apr_pstrdup(r->pool, identity.c_str());
       return DECLINED;
 
     } catch(opkele::exception &e) {

