Thomas Bruederli
2014-10-14 b51de3279f579f53069a1aee49686102bce81166
Display custom error messages from plugins hooks (as documented in the API spec)
1 files modified
4 ■■■■ changed files
index.php 4 ●●●● patch | view | raw | blame | history
index.php
@@ -147,7 +147,7 @@
            $error_code = RCMAIL::ERROR_INVALID_REQUEST;
        }
        else {
            $error_code = $auth['error'] ? $auth['error'] : $RCMAIL->login_error();
            $error_code = is_numeric($auth['error']) ? $auth['error'] : $RCMAIL->login_error();
        }
        $error_labels = array(
@@ -157,7 +157,7 @@
            RCMAIL::ERROR_INVALID_HOST     => 'invalidhost',
        );
        $error_message = $error_labels[$error_code] ? $error_labels[$error_code] : 'loginfailed';
        $error_message = !is_numeric($auth['error']) ? $auth['error'] : ($error_labels[$error_code] ?: 'loginfailed');
        $OUTPUT->show_message($error_message, 'warning');