Hi all,
For various reasons I need to know who logged into RoundCube when and
from where. I can't imagine any other admin not wanting to know, and I
don't understand how I got to run RoundCube for so long without knowing :)
I'd like to propose something like this:
--- index.php (revision 1480)
+++ index.php (working copy)
@@ -86,6 +86,10 @@
// send auth cookie if necessary
$RCMAIL->authenticate_session();
+ // log successful login
+ if ($RCMAIL->config->get('debug_level') & 1)
+ console(sprintf('Successful login for %s from %s',
trim(get_input_value('_user', RCUBE_INPUT_POST), ' '),
$_SERVER['REMOTE_ADDR']));
+
// send redirect
header("Location: {$RCMAIL->comm_path}");
exit;
This results in a line like this in logs/console:
[06-Jun-2008 10:08:45 +0200]: Successful login for robin (id 8) from
16.35.94.15
Robin
_______________________________________________
List info: http://lists.roundcube.net/dev/