Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add option to log successful logins.

  • Loading branch information...
commit 5e0045b128b46cd9611d86731803bc3a910cd275 1 parent 70a0566
svncommit authored
Showing with 14 additions and 0 deletions.
  1. +4 −0 CHANGELOG
  2. +3 −0  config/main.inc.php.dist
  3. +7 −0 index.php
View
4 CHANGELOG
@@ -1,6 +1,10 @@
CHANGELOG RoundCube Webmail
---------------------------
+2008/06/06 (robin)
+----------
+- Add option to log successful logins
+
2008/06/06 (alec)
----------
- TLS support in LDAP connections: 'use_tls' property (#1485104)
View
3  config/main.inc.php.dist
@@ -341,5 +341,8 @@ $rcmail_config['logout_expunge'] = FALSE;
*/
$rcmail_config['delete_always'] = false;
+// Log successful logins
+// $rcmail_config['log_logins'] = false;
+
// end of config file
?>
View
7 index.php
@@ -86,6 +86,13 @@
// 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;
Please sign in to comment.
Something went wrong with that request. Please try again.