summaryrefslogtreecommitdiff
path: root/roundcubemail/index.php
diff options
context:
space:
mode:
authorrobin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-06-06 11:11:30 +0000
committerrobin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-06-06 11:11:30 +0000
commit5e83d88192f5214d571ee602a732dabdcbcbc11b (patch)
tree8156291d8d1a3a87a0c0cd08286a702355a73691 /roundcubemail/index.php
parent54b6c9a8c8f45af47fcf067d1240e1c911cb7e79 (diff)
Add option to log successful logins.
git-svn-id: https://svn.roundcube.net/trunk@1483 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/index.php')
-rw-r--r--roundcubemail/index.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/roundcubemail/index.php b/roundcubemail/index.php
index ea62f9aea..9f4d9148a 100644
--- a/roundcubemail/index.php
+++ b/roundcubemail/index.php
@@ -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;