From 17ee7f669c94439a8c4526e5aba6c021922a9868 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Sat, 22 Oct 2005 12:07:40 +0200
Subject: [PATCH] use REMOTE_USER for username if nothing else available #587

darcs-hash:20051022100740-7ad00-29869f9ced046d42d4f0a2fc484d37b85801108f.gz
---
 inc/common.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/inc/common.php b/inc/common.php
index e08858665..e5ab385ca 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -36,6 +36,11 @@ function pageinfo(){
     $info['userinfo']   = $USERINFO;
     $info['perm']       = auth_quickaclcheck($ID);
     $info['subscribed'] = is_subscribed($ID,$_SERVER['REMOTE_USER']);
+
+    // if some outside auth were used only REMOTE_USER is set
+    if(!$info['userinfo']['name']){
+      $info['userinfo']['name'] = $_SERVER['REMOTE_USER'];
+    }
   }else{
     $info['perm']       = auth_aclcheck($ID,'',null);
     $info['subscribed'] = false;
-- 
GitLab