[dev] LDAP preference storage with 2.3
Jon Parise
jon@csh.rit.edu
Wed, 17 Jan 2001 12:19:28 -0500
On Wed, Jan 17, 2001 at 09:59:45AM -0500, Michael Bull wrote:
> >$conf['prefs']['params']['uid'] = 'uid';
>
> From the look of your file, you've got IMP using the main LDAP system of
> your university, correct?
Correct.
> Could you explain the uid setting? Is the object container to which to add
> the IMP object to? If so, does it matter if those objects don't exist?
> The rootdn is just the rootdn where the username/password that is bound to
> ldap is allowed to create the objects, right?
The 'uid' parameter is used in the initial search that is performed in
order to retrieve the user's full dn. Some setups make use a field
other than 'uid' to store the user, which is why it's configurable.
For example, some sites may require you to log into IMP with your full
email address. Inside IMP, that's the only user identifier we have,
so that's what gets passed to the LDAP preferences driver. In that
case, we might set $conf['prefs']['params']['uid'] = 'mail', or
something similar.
> >$conf['prefs']['params']['username'] = '';
> >$conf['prefs']['params']['password'] = '';
>
> ... and I assume this is just a username and password to bind to ldap with,
> and the names were changed to protect the innocent? :)
Sort of. Yes, they specify the username and password with which to
bind to the LDAP server, but if the above fields are left empty, the
LDAP preferences driver will attempt to bind with the current user's
username and password (which is what we do here).
> >Yes, many attributes are missing from the example schema. I've been
> >remiss in keeping it up-to-date with the changes to config/prefs.php.
>
> Once we've got it up here, I'll send you an updated schema.
Groovy.
You might want to sift through the LDAP driver's code a little, too.
I believe I did a pretty decent job of commenting it, and it's really
the only form of documentation that exists at this point.
--
Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/ : Computer Science House Member