LDAP user functions.
This file is intended to be used instead of the standard user.php file. I have not tested this yet (I do not have an LDAP server running yet), so please provide feedback.
This file contains all the functions for getting information about users. So, if you want to use an authentication scheme other than the webcal_user table, you can just create a new version of each function found below.
Note: this application assumes that usernames (logins) are unique.
Note #2: If you are using HTTP-based authentication, then you still need these functions and you will still need to add users to webcal_user.
Connects and binds to the LDAP server Tries to connect as $ldap_admin_dn if we set it.
Searches $ldap_admin_group_dn and returns an array of the group members.
Do this search only once per request.
Strip everything but the username (uid) from a dn.
Test if a user is an admin, that is: if the user is a member of a special group in the LDAP Server
Function to search the dn of a given user.
the error message will be placed in $error.
Documentation generated on Thu, 10 Jun 2010 17:08:38 -0400 by phpDocumentor 1.4.3