From: Michael M Slusarz Date: Tue, 25 Jan 2011 00:04:27 +0000 (-0700) Subject: Better IMP login logging when not using IMP as authentication method X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=90aae489bfe439bc0343c83edc8e370003850fab;p=horde.git Better IMP login logging when not using IMP as authentication method --- diff --git a/imp/lib/Auth.php b/imp/lib/Auth.php index 4d715261f..1e684f5c4 100644 --- a/imp/lib/Auth.php +++ b/imp/lib/Auth.php @@ -182,11 +182,14 @@ class IMP_Auth $level = 'INFO'; } - $auth_id = $GLOBALS['registry']->getAuth(); + $user = $imap_ob->getParam('username'); + if (($auth_id = $GLOBALS['registry']->getAuth()) !== false) { + $user .= ' (Horde user ' . $auth_id . ')'; + } $msg = sprintf( - $msg . ' %s [%s]%s to {%s:%s%s}', - !strlen($auth_id) ? '' : 'for ' . $auth_id, + $msg . ' for %s [%s]%s to {%s:%s%s}', + $user, $_SERVER['REMOTE_ADDR'], empty($_SERVER['HTTP_X_FORWARDED_FOR']) ? '' : ' (forwarded for [' . $_SERVER['HTTP_X_FORWARDED_FOR'] . '])', $imap_ob->ob ? $imap_ob->getParam('hostspec') : '',