]> git.donarmstrong.com Git - roundcube.git/blobdiff - plugins/http_authentication/http_authentication.php
Imported Debian patch 0.5.2+dfsg-1
[roundcube.git] / plugins / http_authentication / http_authentication.php
index 57422a74d74c2ab0377252c32b7cbad54310ee3c..6da6488a003ac364de4ad30ed9726d5ce07c2d30 100644 (file)
@@ -5,11 +5,12 @@
  *
  * Make use of an existing HTTP authentication and perform login with the existing user credentials
  *
- * @version 1.0
+ * @version 1.2
  * @author Thomas Bruederli
  */
 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';
 
@@ -33,6 +34,9 @@ class http_authentication extends rcube_plugin
       $args['user'] = $_SERVER['PHP_AUTH_USER'];
       $args['pass'] = $_SERVER['PHP_AUTH_PW'];
     }
+    
+    $args['cookiecheck'] = false;
+    $args['valid'] = true;
   
     return $args;
   }