File/includes/user-ldap.php

Description

$Id$ 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.

$Log$ Revision 1.2 2010/03/25 00:40:29 dick Apply patch from monnerat Get rid of PHP 5.3 deprecated features - ID: 2873491 https://sourceforge.net/tracker/?func=detail&aid=2873491&group_id=3870&atid=303870

Functions
connect_and_bind (line 676)

Connects and binds to the LDAP server Tries to connect as $ldap_admin_dn if we set it.

  • return: result or false
bind connect_and_bind ()
get_uid_from_dn (line 638)
void get_uid_from_dn ( $dn)
  • $dn
stripdn (line 666)

Strip everything but the username (uid) from a dn.

  • return: - userid ex: stripdn(uid=jeffh,ou=people,dc=example,dc=com) returns jeffh
string stripdn ($dn $dn)
  • $dn $dn: - the dn you want to strip the uid from.
user_search_dn (line 130)

Function to search the dn of a given user the error message will be placed in $error.

  • return: TRUE if the user is found, FALSE in other case
bool user_search_dn ($login $login)
  • $login $login: - user login
user_valid_crypt (line 219)

Check to see if a given login/crypted password is valid.

  • return: true or false - ALWAYS TRUE
  • global: $error 0: If invalid, the error message will be placed in $error.
  • todo: NOT IMPLEMENTED
boolean user_valid_crypt (string $login, string $crypt_password)
  • string $login: - user login
  • string $crypt_password: - crypted user password
user_valid_login (line 165)

Check to see if a given login/password is valid. If invalid,

  • return: true or false
  • global: $error $error: the error message will be placed in $error.
bool user_valid_login ($login $login, $password $password)
  • $login $login: - user login
  • $password $password: - user password

Documentation generated on Sat, 05 Jun 2010 23:23:32 -0400 by phpDocumentor 1.4.3