diff options
author | alecpl <alec@alec.pl> | 2010-02-06 18:12:49 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-02-06 18:12:49 +0000 |
commit | 9b94eb64153a7dc6555d6b9a30a35296ce592f82 (patch) | |
tree | f4ae470d942d0e88446fa6c0e220338f5b220adc /plugins/http_authentication/http_authentication.php | |
parent | a65bf3a14b617d4af6749bab9e6ac7668fb99292 (diff) |
- 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'.
Diffstat (limited to 'plugins/http_authentication/http_authentication.php')
-rw-r--r-- | plugins/http_authentication/http_authentication.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/http_authentication/http_authentication.php b/plugins/http_authentication/http_authentication.php index 57422a74d..7c2296614 100644 --- a/plugins/http_authentication/http_authentication.php +++ b/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'; |