[dev] Re: Preferences storage

Jon Parise jon@csh.rit.edu
Fri, 3 Nov 2000 15:51:21 -0500


On Fri, Aug 25, 2000 at 11:34:07AM -0400, Chuck Hagenbuch wrote:

> To elaborate a bit, this would be something like $params['dblookup'] =
> 'function_name'; function_name would have to be defined, and you'd call it
> to get the rest of the info - psuedocode (not sure I like 'dblookup'; use
> what makes sense):
> 
> if (!empty($params['dblookup']) && function_exists($params['dblookup'])) {
>   $func = $params['dblookup'];
>   $params = $func($user);
> }

Alright, I just got around to implementing this. =)

I haven't actually written a function with which to test the
functionality, but it should work just fine based on the
implementation.

Set $conf['prefs']['params']['user_hook'] = 'user_lookup_function'
to specify the name of the lookup function.

-- 
Jon Parise (jon@csh.rit.edu)  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member