<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>LDAP driver for Portal Block account info do not work</title> 
  <pubDate>Thu, 09 Apr 2026 12:39:00 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/9770</link> 
  <atom:link rel="self" type="application/rss+xml" title="LDAP driver for Portal Block account info do not work" href="https://bugs.horde.org/ticket/9770/rss" /> 
  <description>LDAP driver for Portal Block account info do not work</description> 
 
   
   
  <item> 
   <title>The portal Block for Account info throws errors with LDAP dr</title> 
   <description>The portal Block for Account info throws errors with LDAP driver:

Apr  1 12:18:32 dmz-sv-webmail HORDE: HORDE [horde] PHP ERROR: Undefined index: params [pid 9310 on line 46 of &quot;/var/www/html/horde/lib/Block/Account.php&quot;]
Apr  1 12:18:32 dmz-sv-webmail HORDE: HORDE [horde] PHP ERROR: array_merge(): Argument #2 is not an array [pid 9310 on line 443 of &quot;/var/www/html/horde/lib/Block/Account.php&quot;]
Apr  1 12:18:32 dmz-sv-webmail HORDE: HORDE [horde] PHP ERROR: ldap_search(): Search: Bad search filter [pid 9310 on line 548 of &quot;/var/www/html/horde/lib/Block/Account.php&quot;]
Apr  1 12:18:32 dmz-sv-webmail HORDE: HORDE [horde] PHP ERROR: ldap_first_entry() expects parameter 2 to be resource, boolean given [pid 9310 on line 549 of &quot;/var/www/html/horde/lib/Block/Account.php&quot;]
Apr  1 12:18:32 dmz-sv-webmail HORDE: HORDE [horde] PHP ERROR: ldap_get_entries() expects parameter 2 to be resource, boolean given [pid 9310 on line 550 of &quot;/var/www/html/horde/lib/Block/Account.php&quot;]


The reason is a mismatch between conf.php file an the code:

The code assumes parameters for LDAP in [&#039;accounts&#039;][&#039;params&#039;] but the configuration looks like this:

$conf[&#039;accounts&#039;][&#039;basedn&#039;] = &#039;ou=Personen,o=physik&#039;;
$conf[&#039;accounts&#039;][&#039;scope&#039;] = &#039;sub&#039;;
$conf[&#039;accounts&#039;][&#039;attr&#039;] = &#039;cn&#039;;
$conf[&#039;accounts&#039;][&#039;strip&#039;] = false;
$conf[&#039;accounts&#039;][&#039;driverconfig&#039;] = &#039;horde&#039;;
$conf[&#039;accounts&#039;][&#039;driver&#039;] = &#039;ldap&#039;;
$</description> 
   <pubDate>Fri, 01 Apr 2011 10:29:23 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9770#t62960</link> 
  </item> 
   
  <item> 
   <title>It is just a simple patch in horde/config/conf.xml

The &quot;c</title> 
   <description>It is just a simple patch in horde/config/conf.xml

The &quot;configsection&quot; is missing around the Account Block LDAP driver. Appended is a patch</description> 
   <pubDate>Thu, 14 Apr 2011 10:25:06 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9770#t63721</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

[jan] Fix LD</title> 
   <description>Changes have been made in Git for this ticket:

[jan] Fix LDAP parameters of account portal block (Klaus Steinberger, Bug #9770).

 3 files changed, 15 insertions(+), 7 deletions(-)
http://git.horde.org/horde-git/-/commit/a145d8735d1142c78ca4e623ea822e3b283134df</description> 
   <pubDate>Thu, 14 Apr 2011 19:53:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9770#t63768</link> 
  </item> 
   
  <item> 
   <title>&gt; Changes have been made in Git for this ticket:

I have j</title> 
   <description>&gt; Changes have been made in Git for this ticket:

I have just seen that there is a little more to be done.

in horde/lib/Block/Account.php line 445 &quot;host&quot; ist used as parameter, but the new config structure uses &quot;hostspec&quot;

        // Connect to the LDAP server.
        $this-&gt;_ds = ldap_connect($this-&gt;_params[&#039;host&#039;],
                                  $this-&gt;_params[&#039;port&#039;]);

this is easy to change, but also the defaults are not taken correctly:

in the     function Accounts_Driver_ldap($params = array()) 

there is also host referenced instead of hostspec. I have changed both, but the horde default config is not used, so maybe the array merging is done incorrectly?
</description> 
   <pubDate>Fri, 15 Apr 2011 09:16:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9770#t63791</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Refactor LDA</title> 
   <description>Changes have been made in Git for this ticket:

Refactor LDAP driver to user Horde_Ldap (Bug #9770).

 1 files changed, 74 insertions(+), 151 deletions(-)
http://git.horde.org/horde-git/-/commit/2bb5eb64a50c270fe0f7d9fce688af14a4c7ed96</description> 
   <pubDate>Tue, 19 Apr 2011 13:47:05 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9770#t63891</link> 
  </item> 
   
  <item> 
   <title>&gt; Changes have been made in Git for this ticket:
&gt;
&gt; Refac</title> 
   <description>&gt; Changes have been made in Git for this ticket:
&gt;
&gt; Refactor LDAP driver to user Horde_Ldap (Bug #9770).
&gt;
&gt;  1 files changed, 74 insertions(+), 151 deletions(-)
&gt; http://git.horde.org/horde-git/-/commit/2bb5eb64a50c270fe0f7d9fce688af14a4c7ed96

Did it work only with git head?
I&#039;ve tried the changes but got:

[Tue Apr 19 15:55:48 2011] [error] [client 141.84.12.60] PHP Fatal error:  Class &#039;Horde_Block_Account_Ldap&#039; not found in /var/www/html/horde/lib/Block/Account.php on line 57, referer: http://dmz-sv-webmail.physik.uni-muenchen.de/horde/admin/config/index.php

Sincerly,
Klaus</description> 
   <pubDate>Tue, 19 Apr 2011 14:03:07 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9770#t63893</link> 
  </item> 
   
  <item> 
   <title>&gt; I&#039;ve tried the changes but got:

No, you did not. You do</title> 
   <description>&gt; I&#039;ve tried the changes but got:

No, you did not. You downloaded the complete file which had even more changes after this one.</description> 
   <pubDate>Tue, 19 Apr 2011 14:30:23 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9770#t63899</link> 
  </item> 
   
  <item> 
   <title>&gt; Changes have been made in Git for this ticket:
&gt;
&gt; Refac</title> 
   <description>&gt; Changes have been made in Git for this ticket:
&gt;
&gt; Refactor LDAP driver to user Horde_Ldap (Bug #9770).
&gt;
&gt;  1 files changed, 74 insertions(+), 151 deletions(-)
&gt; http://git.horde.org/horde-git/-/commit/2bb5eb64a50c270fe0f7d9fce688af14a4c7ed96

There is still an error in getPasswordChange function: it always return 01/01/1970 because it miss &#039;* 86400&#039;

Here solution:

--- Ldap.php.orig	2011-04-26 12:17:18.000000000 +0200
+++ Ldap.php	2011-04-26 13:27:43.000000000 +0200
@@ -175,7 +175,7 @@
     {
         $information = $this-&gt;_getAccount();
         try {
-            return strftime(&#039;%x&#039;, $information-&gt;getValue(&#039;shadowlastchange&#039;, &#039;single&#039;));
+            return strftime(&#039;%x&#039;, $information-&gt;getValue(&#039;shadowlastchange&#039;, &#039;single&#039;) * 86400);
         } catch (Horde_Ldap_Exception $e) {
         }
         try {

Regards,
  Marco</description> 
   <pubDate>Tue, 26 Apr 2011 11:35:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9770#t64144</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Fix shadowla</title> 
   <description>Changes have been made in Git for this ticket:

Fix shadowlastchange calculation (Bug #9770).

 2 files changed, 3 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/7c5b7fc12ec223b2685adcf47059626e4a304551</description> 
   <pubDate>Tue, 26 Apr 2011 17:17:05 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9770#t64163</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
