diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-05 07:27:23 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-05 07:27:23 +0000 |
| commit | 061a1ec3e3a178ea7ec559099433100b2113d70b (patch) | |
| tree | 8a9c34e984e9df616aef9134af5182274bdae5e4 /roundcubemail/index.php | |
| parent | add0b05da6b9279d3e6442ee4c48c0c37372be5c (diff) | |
Killed one more global var + log logins to a separate file (not console)
git-svn-id: https://svn.roundcube.net/trunk@1735 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/index.php')
| -rw-r--r-- | roundcubemail/index.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/roundcubemail/index.php b/roundcubemail/index.php index 46c4229a0..e6201839c 100644 --- a/roundcubemail/index.php +++ b/roundcubemail/index.php @@ -30,9 +30,6 @@ // include environment require_once 'program/include/iniset.php'; -// define global vars -$OUTPUT_TYPE = 'html'; - // init application and start session with requested task $RCMAIL = rcmail::get_instance(); @@ -94,11 +91,12 @@ if ($RCMAIL->action=='login' && $RCMAIL->task=='mail') { $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'])); + if ($RCMAIL->config->get('log_logins')) { + write_log('userlogins', sprintf('Successful login for %s (id %d) from %s', + $RCMAIL->user->get_username(), + $RCMAIL->user->ID, + $_SERVER['REMOTE_ADDR'])); + } // send redirect $OUTPUT->redirect(); |
