From 456b357481dea5776143ea17ec9c13a2ab9e90ec Mon Sep 17 00:00:00 2001 From: alec Date: Sat, 6 Feb 2010 18:12:49 +0000 Subject: - Fix setting task name according to auth state. So, any action before user is authenticated is assigned to 'login' task instead of 'mail'. Now binding plugins to 'login' task is possible and realy usefull. It's also possible to bind to all tasks excluding 'login'. git-svn-id: https://svn.roundcube.net/trunk@3258 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/plugins/http_authentication/http_authentication.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'roundcubemail/plugins/http_authentication/http_authentication.php') diff --git a/roundcubemail/plugins/http_authentication/http_authentication.php b/roundcubemail/plugins/http_authentication/http_authentication.php index 57422a74d..7c2296614 100644 --- a/roundcubemail/plugins/http_authentication/http_authentication.php +++ b/roundcubemail/plugins/http_authentication/http_authentication.php @@ -10,6 +10,7 @@ */ class http_authentication extends rcube_plugin { + public $task = 'login'; function init() { @@ -20,7 +21,7 @@ class http_authentication extends rcube_plugin function startup($args) { // change action to login - if ($args['task'] == 'mail' && empty($args['action']) && empty($_SESSION['user_id']) + if (empty($args['action']) && empty($_SESSION['user_id']) && !empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) $args['action'] = 'login'; -- cgit v1.2.3