[horde] Re: Some user hooks questions

Jan Schneider jan at horde.org
Sun Apr 24 02:03:07 PDT 2005


Zitat von Kevin Myer <kevin_myer at iu13.org>:

> 1)  auth->listUsers returns a userlist to services/shares/edit.php
> 2)  I write a _username_hook_tobackend function that takes a userid (email
> address), and looks up the first and last name of the user (fullname).  Then,
> since the shares editor calls Auth::removeHook to display the names, I should
> get a list of users by their fullname.  In looking through the code, I'm
> thinking the Identity function will do that for me, but I'm concerned that
> invoking that 1400 times (which is the # of users we have) will kill
> performance.  Unless the Identities are cached..

Yes, and yes. You need to use Identities if you allow your users to 
have identities. And yes, with large lists this might be a perfomance 
hit. OTOH, if you  use hooks anyway to propagate the users' identities 
with reasonable default values, you could use the same code in the 
username/backend hooks to show the full name.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the horde mailing list