[horde] Using hooks to permanently set from_addr and fullname

Kevin Myer kevin_myer at iu13.org
Thu Jul 21 14:10:29 PDT 2005


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Are you sure this is from preferences hooks? The check on line 707 of
> Prefs.php:
>
>        if (!is_null($this->_hooksCalled) && !Auth::getAuth()) {
>            return;
>        }
>
> ... looks suspicious to me - should that be && Auth::getAuth(), instead
> of ! ? Anyone?
>
> .. but even so, prefs are cached during a session. So unless that
> caching is failing somehow, the hooks should only be called once per
> session - I don't see any place that calls Prefs::_callHooks() outside
> of Prefs::retrieve(), after we return if prefs are found cached.

I can now confirm that it is the hooks generating all these requests.  
I added an array of attributes for each of the hooks, so I could 
distinguish what was generating the searches.  I imported a calendar - 
result was 100 LDAP connections/second, looking up:

[21/Jul/2005:17:08:07 -0400] conn=9431461 op=1 SRCH 
base="ou=People,dc=iu13,dc=k12,dc=pa,dc=us" scope=1 
filter="(mail=kevin_myer at iu13.org)" attrs="cn fullname1"
[21/Jul/2005:17:08:07 -0400] conn=9431462 op=1 SRCH 
base="ou=People,dc=iu13,dc=k12,dc=pa,dc=us" scope=1 
filter="(mail=kevin_myer at iu13.org)" attrs="mail from_addr"

Seen in both FRAMEWORK_3 and HEAD, the former from mostly official 
release code, the latter from a yesterday's CVS checkout.

Kevin

-- 
Kevin M. Myer
Senior Systems Administrator
Lancaster-Lebanon Intermediate Unit 13  http://www.iu13.org




More information about the horde mailing list