From 9b94eb64153a7dc6555d6b9a30a35296ce592f82 Mon Sep 17 00:00:00 2001 From: alecpl 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'. --- plugins/autologon/autologon.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/autologon') diff --git a/plugins/autologon/autologon.php b/plugins/autologon/autologon.php index c40f2d4eb..bc3d2ee76 100644 --- a/plugins/autologon/autologon.php +++ b/plugins/autologon/autologon.php @@ -6,6 +6,7 @@ */ class autologon extends rcube_plugin { + public $task = 'login'; function init() { @@ -18,7 +19,7 @@ class autologon extends rcube_plugin $rcmail = rcmail::get_instance(); // change action to login - if ($args['task'] == 'mail' && empty($args['action']) && empty($_SESSION['user_id']) && !empty($_GET['_autologin']) && $this->is_localhost()) + if (empty($_SESSION['user_id']) && !empty($_GET['_autologin']) && $this->is_localhost()) $args['action'] = 'login'; return $args; -- cgit v1.2.3