[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/core/ -> ldap_api.php (summary)

LDAP API

Copyright: Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
Copyright: Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net
File Size: 464 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 14 functions

  ldap_connect_bind()
  ldap_email()
  ldap_email_from_username()
  ldap_realname()
  ldap_realname_from_username()
  ldap_escape_string()
  ldap_get_field_from_username()
  ldap_authenticate()
  ldap_authenticate_by_username()
  ldap_simulation_is_enabled()
  ldap_simulation_get_user()
  ldap_simulation_email_from_username()
  ldap_simulatiom_realname_from_username()
  ldap_simulation_authenticate_by_username()

Functions
Functions that are not part of a class:

ldap_connect_bind( $p_binddn = '', $p_password = '' )   X-Ref
Connect and bind to the LDAP directory

param: string $p_binddn
param: string $p_password
return: resource or false

ldap_email( $p_user_id )   X-Ref
returns an email address from LDAP, given a userid

param: int $p_user_id
return: string

ldap_email_from_username( $p_username )   X-Ref
Return an email address from LDAP, given a username

param: string $p_username
return: string

ldap_realname( $p_user_id )   X-Ref
Gets a user's real name (common name) given the id.

param: int $p_user_id  The user id.
return: string real name.

ldap_realname_from_username( $p_username )   X-Ref
Gets a user real name given their user name.

param: string $p_username The user's name.
return: string The user's real name.

ldap_escape_string( $p_string )   X-Ref
Escapes the LDAP string to disallow injection.

param: string $p_string The string to escape.
return: string The escaped string.

ldap_get_field_from_username( $p_username, $p_field )   X-Ref
Gets the value of a specific field from LDAP given the user name
and LDAP field name.

param: string $p_username The user name.
param: string $p_field The LDAP field name.
return: string The field value or null if not found.

ldap_authenticate( $p_user_id, $p_password )   X-Ref
Attempt to authenticate the user against the LDAP directory
return true on successful authentication, false otherwise

param: int $p_user_id
param: string $p_password
return: bool

ldap_authenticate_by_username( $p_username, $p_password )   X-Ref
Authenticates an user via LDAP given the username and password.

param: string $p_username The user name.
param: string $p_password The password.
return: true: authenticated, false: failed to authenticate.

ldap_simulation_is_enabled()   X-Ref
Checks if the LDAP simulation mode is enabled.

return: bool true if enabled, false otherwise.

ldap_simulation_get_user( $p_username )   X-Ref
Gets a user from LDAP simulation mode given the username.

param: string $p_username  The user name.
return: mixed an associate array with user information or null if not found.

ldap_simulation_email_from_username( $p_username )   X-Ref
Given a username, gets the email address or empty address if user is not found.

param: string $p_username The user name.
return: The email address or blank if user is not found.

ldap_simulatiom_realname_from_username( $p_username )   X-Ref
Given a username, this methods gets the realname or empty string if not found.

param: string $p_username  The username.
return: string The real name or an empty string if not found.

ldap_simulation_authenticate_by_username( $p_username, $p_password )   X-Ref
Authenticates the specified user id / password based on the simulation data.

param: string $p_username   The username.
param: string $p_password  The password.
return: bool true for authenticated, false otherwise.



Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7