summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-09-02 11:45:28 +0200
committerAleksander Machniak <alec@alec.pl>2013-09-02 11:45:28 +0200
commit060467df9d95be3768dab51ff5dd4e6214ec86a0 (patch)
tree9a9249fa5860953b0284b8e32330558598fa407c /index.php
parent5a8ee396a15085941257d66751164d0fa5027843 (diff)
Log also failed logins to userlogins log
Diffstat (limited to 'index.php')
-rw-r--r--index.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/index.php b/index.php
index 2d220dede..3be71f249 100644
--- a/index.php
+++ b/index.php
@@ -138,7 +138,7 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') {
}
else {
if (!$auth['valid']) {
- $error_code = RCMAIL::ERROR_INVALID_REQUEST;
+ $error_code = RCMAIL::ERROR_INVALID_REQUEST;
}
else {
$error_code = $auth['error'] ? $auth['error'] : $RCMAIL->login_error();
@@ -153,6 +153,9 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') {
$error_message = $error_labels[$error_code] ? $error_labels[$error_code] : 'loginfailed';
+ // log failed login
+ $RCMAIL->log_login($auth['user'], true, $error_code);
+
$OUTPUT->show_message($error_message, 'warning');
$RCMAIL->plugins->exec_hook('login_failed', array(
'code' => $error_code, 'host' => $auth['host'], 'user' => $auth['user']));