CoreAPI
[ class tree: CoreAPI ] [ index: CoreAPI ] [ all elements ]

Procedural File: ldap_api.php

Source Location: /core/ldap_api.php



Page Details:

LDAP API



Tags:

copyright:  Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
copyright:  Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
link:  http://www.mantisbt.org








ldap_authenticate [line 273]

bool ldap_authenticate( int $p_user_id, string $p_password)

Attempt to authenticate the user against the LDAP directory

return true on successful authentication, false otherwise




Parameters

int   $p_user_id  
string   $p_password  
[ Top ]



ldap_authenticate_by_username [line 293]

true: ldap_authenticate_by_username( string $p_username, string $p_password)

Authenticates an user via LDAP given the username and password.



Tags:

return:  authenticated, false: failed to authenticate.


Parameters

string   $p_username   The user name.
string   $p_password   The password.
[ Top ]



ldap_connect_bind [line 32]

resource ldap_connect_bind( [string $p_binddn = ''], [string $p_password = ''])

Connect and bind to the LDAP directory



Tags:

return:  or false


Parameters

string   $p_binddn  
string   $p_password  
[ Top ]



ldap_email [line 93]

string ldap_email( int $p_user_id)

returns an email address from LDAP, given a userid



Parameters

int   $p_user_id  
[ Top ]



ldap_email_from_username [line 112]

string ldap_email_from_username( string $p_username)

Return an email address from LDAP, given a username



Parameters

string   $p_username  
[ Top ]



ldap_escape_string [line 162]

string ldap_escape_string( string $p_string)

Escapes the LDAP string to disallow injection.



Tags:

return:  The escaped string.


Parameters

string   $p_string   The string to escape.
[ Top ]



ldap_get_field_from_username [line 182]

string ldap_get_field_from_username( string $p_username, string $p_field)

Gets the value of a specific field from LDAP given the user name and LDAP field name.



Tags:

return:  The field value or null if not found.
todo:  Implement caching by retrieving all needed information in one query.
todo:  Implement logging to LDAP queries same way like DB queries.


Parameters

string   $p_username   The user name.
string   $p_field   The LDAP field name.
[ Top ]



ldap_has_group [line 239]

bool ldap_has_group( int $p_user_id, string $p_group)

Return true if the $uid has an assigngroup=$p_group tag, false otherwise



Parameters

int   $p_user_id  
string   $p_group  
[ Top ]



ldap_realname [line 131]

string ldap_realname( int $p_user_id)

Gets a user's real name (common name) given the id.



Tags:

return:  real name.


Parameters

int   $p_user_id   The user id.
[ Top ]



ldap_realname_from_username [line 142]

string ldap_realname_from_username( string $p_username)

Gets a user real name given their user name.



Tags:

return:  The user's real name.


Parameters

string   $p_username   The user's name.
[ Top ]



ldap_simulatiom_realname_from_username [line 445]

string ldap_simulatiom_realname_from_username( string $p_username)

Given a username, this methods gets the realname or empty string if not found.



Tags:

return:  The real name or an empty string if not found.


Parameters

string   $p_username   The username.
[ Top ]



ldap_simulation_authenticate_by_username [line 463]

bool ldap_simulation_authenticate_by_username( string $p_username, string $p_password)

Authenticates the specified user id / password based on the simulation data.



Tags:

return:  true for authenticated, false otherwise.


Parameters

string   $p_username   The username.
string   $p_password   The password.
[ Top ]



ldap_simulation_email_from_username [line 428]

The ldap_simulation_email_from_username( string $p_username)

Given a username, gets the email address or empty address if user is not found.



Tags:

return:  email address or blank if user is not found.


Parameters

string   $p_username   The user name.
[ Top ]



ldap_simulation_get_user [line 392]

mixed ldap_simulation_get_user( string $p_username)

Gets a user from LDAP simulation mode given the username.



Tags:

return:  an associate array with user information or null if not found.


Parameters

string   $p_username   The user name.
[ Top ]



ldap_simulation_is_enabled [line 381]

bool ldap_simulation_is_enabled( )

Checks if the LDAP simulation mode is enabled.



Tags:

return:  true if enabled, false otherwise.


[ Top ]



Documentation generated on Sun, 12 Dec 2010 23:50:35 +0900 by phpDocumentor 1.4.3
inserted by FC2 system