diff options
author | svncommit <devs@roundcube.net> | 2008-06-06 11:11:30 +0000 |
---|---|---|
committer | svncommit <devs@roundcube.net> | 2008-06-06 11:11:30 +0000 |
commit | 5e0045b128b46cd9611d86731803bc3a910cd275 (patch) | |
tree | 53b9b9ea501959c4c3bfba496058f99f65528a46 /index.php | |
parent | 70a05665624822dbba5a6417a782709b7067d190 (diff) |
Add option to log successful logins.
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -86,6 +86,13 @@ if ($RCMAIL->action=='login' && $RCMAIL->task=='mail') { // send auth cookie if necessary $RCMAIL->authenticate_session(); + // log successful login + if ($RCMAIL->config->get('log_logins') && $RCMAIL->config->get('debug_level') & 1) + console(sprintf('Successful login for %s (id %d) from %s', + trim(get_input_value('_user', RCUBE_INPUT_POST), ' '), + $_SESSION['user_id'], + $_SERVER['REMOTE_ADDR'])); + // send redirect header("Location: {$RCMAIL->comm_path}"); exit; |