From 1c0ce1fe522c290ef59c45226d9f1f9ea1d5ec20 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 5 Jul 2012 15:42:33 +0200 Subject: Plugin API: Add 'unauthenticated' hook (#1488138) --- CHANGELOG | 1 + index.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 54aecd690..570cbdfa0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Plugin API: Add 'unauthenticated' hook (#1488138) - Show explicit error message when provided hostname is invalid (#1488550) - Fix wrong compose screen elements focus in IE9 (#1488541) - Fix fatal error when date.timezone isn't set (#1488546) diff --git a/index.php b/index.php index 54b87ce0a..ef5733a12 100644 --- a/index.php +++ b/index.php @@ -211,8 +211,10 @@ if (empty($RCMAIL->user->ID)) { if ($session_error || $_REQUEST['_err'] == 'session') $OUTPUT->show_message('sessionerror', 'error', null, true, -1); - $RCMAIL->set_task('login'); - $OUTPUT->send('login'); + $plugin = $RCMAIL->plugins->exec_hook('unauthenticated', array('task' => 'login', 'error' => $session_error)); + + $RCMAIL->set_task($plugin['task']); + $OUTPUT->send($plugin['task']); } // CSRF prevention else { -- cgit v1.2.3