Improved logging for virtual hosts in IMP

Fritz Zaucker zaucker@ee.ethz.ch
Tue, 12 Mar 2002 08:55:25 +0100 (MET)


Hi,

the following patches write login/logout of $imp['uniquser'] instead of
$imp['user']. This seems to make more sense in a virtual host environment
and shouldn't hurt otherwise:

--- horde/imp/redirect.php.dist   Wed Jan  2 18:05:32 2002
+++ horde/imp/redirect.php        Mon Mar 11 23:44:56 2002
@@ -47,7 +47,7 @@
     if (($reason = IMP::createSession()) === true) {
         $imp['_login'] = true;
         $entry = sprintf('Login success for %s [%s] to {%s:%s}',
-                         $imp['user'], $HTTP_SERVER_VARS['REMOTE_ADDR'], $imp['server'], $imp['port']);
+                         $imp['uniquser'], $HTTP_SERVER_VARS['REMOTE_ADDR'], $imp['server'], $imp['port']);
         Horde::logMessage($entry, __FILE__, __LINE__, LOG_NOTICE);

         if (Horde::getFormData('redirect_url')) {



--- horde/imp/login.php.dist      Wed Jan  2 18:05:28 2002
+++ horde/imp/login.php   Mon Mar 11 23:47:53 2002
@@ -66,7 +66,7 @@
 if (isset($HTTP_SESSION_VARS['imp']) && is_array($HTTP_SESSION_VARS['imp'])) {
     if ($reason == 'logout') {
         $entry = sprintf('Logout for %s [%s] from {%s:%s}',
-                         $HTTP_SESSION_VARS['imp']['user'],
+                         $HTTP_SESSION_VARS['imp']['uniquser'],
                          $HTTP_SERVER_VARS['REMOTE_ADDR'], $HTTP_SESSION_VARS['imp']['server'],
                          $HTTP_SESSION_VARS['imp']['port']);
         Horde::logMessage($entry, __FILE__, __LINE__, LOG_NOTICE);


Best regards,
Fritz

-- 
Dr. Fritz Zaucker, Head IT Support Group
Department of Information Technology and Electrical Engineering
Swiss Federal Institute of Technology
ETZ J97, Gloriastrasse 35, CH-8092 Zurich, Switzerland
Tel.: +41-1-632-5241 Fax: +41-1-632-1194 http://people.ee.ethz.ch/~zaucker/
E-mail: zaucker@ee.ethz.ch (see home page for PGP key)