[ingo] username/password in backends.php

Marc Sluiter news at msluiter.de
Sun Nov 26 12:56:03 PST 2006


Hi all!

I'm using Ingo (head version) with maildrop backend, and had a problem configuring it. In the backends.php I wanted to 
specify "username" and "password" for connecting with ftp to the maildrop script, and I wanted to use the full name of 
the logged in user in "vfs_path" (using the %u). This was not possible, setting "hordeauth" to "full" made Ingo ignoring 
the specified "username" and "password". I changed this behaviour by switching the order of if-statements in 
ingo/lib/Ingo.php, see patch below.

So my question is: was there a reason for ignoring username and password, even when both are set?

Regards, Marc


Index: Ingo.php
===================================================================
RCS file: /repository/ingo/lib/Ingo.php,v
retrieving revision 1.98
diff -u -r1.98 Ingo.php
--- Ingo.php	9 Oct 2006 12:33:38 -0000	1.98
+++ Ingo.php	26 Nov 2006 20:35:44 -0000
@@ -268,14 +268,14 @@
          $params = $_SESSION['ingo']['backend']['params'];

          // Set authentication parameters.
-        if (!empty($_SESSION['ingo']['backend']['hordeauth'])) {
-            $params['username'] = ($_SESSION['ingo']['backend']['hordeauth'] === 'full')
-                        ? Auth::getAuth() : Auth::getBareAuth();
-            $params['password'] = Auth::getCredential('password');
-        } elseif (isset($_SESSION['ingo']['backend']['params']['username']) &&
+        if (isset($_SESSION['ingo']['backend']['params']['username']) &&
                    isset($_SESSION['ingo']['backend']['params']['password'])) {
              $params['username'] = $_SESSION['ingo']['backend']['params']['username'];
              $params['password'] = $_SESSION['ingo']['backend']['params']['password'];
+        } elseif (!empty($_SESSION['ingo']['backend']['hordeauth'])) {
+            $params['username'] = ($_SESSION['ingo']['backend']['hordeauth'] === 'full')
+                        ? Auth::getAuth() : Auth::getBareAuth();
+            $params['password'] = Auth::getCredential('password');
          } else {
              $params['username'] = Auth::getBareAuth();
              $params['password'] = Auth::getCredential('password');


More information about the ingo mailing list