|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Namespaces | |
| namespace | core |
Functions | |
| if(!defined('ROOTDSE')) | ldap_supported_usertypes () |
| ldap_getdefaults () | |
| ldap_isgroupmember ($ldapconnection, $userid, $group_dns, $member_attrib) | |
| ldap_connect_moodle ($host_url, $ldap_version, $user_type, $bind_dn, $bind_pw, $opt_deref, &$debuginfo) | |
| ldap_find_userdn ($ldapconnection, $username, $contexts, $objectclass, $search_attrib, $search_sub) | |
| ldap_get_entries_moodle ($ldapconnection, $searchresult) | |
| ldap_filter_addslashes ($text) | |
| if(!defined('LDAP_DN_SPECIAL_CHARS')) if(!defined('LDAP_DN_SPECIAL_CHARS_QUOTED_NUM')) if(!defined('LDAP_DN_SPECIAL_CHARS_QUOTED_ALPHA')) | ldap_get_dn_special_chars () |
| ldap_addslashes ($text) | |
| ldap_stripslashes ($text) | |
| ldap_addslashes | ( | $ | text | ) |
Quote control characters in distinguished names used in LDAP - See RFC 4514/2253
| string | The text to quote |
Definition at line 335 of file ldaplib.php.


| ldap_connect_moodle | ( | $ | host_url, |
| $ | ldap_version, | ||
| $ | user_type, | ||
| $ | bind_dn, | ||
| $ | bind_pw, | ||
| $ | opt_deref, | ||
| &$ | debuginfo | ||
| ) |
Tries connect to specified ldap servers. Returns a valid LDAP connection or false.
| string | $host_url | |
| integer | $ldap_version | either 2 (LDAPv2) or 3 (LDAPv3). |
| string | $user_type | the configured user type for this connection. |
| string | $bind_dn | the binding user dn. If an emtpy string, anonymous binding is used. |
| string | $bind_pw | the password for the binding user. Ignored for anonymous bindings. |
| boolean | $opt_deref | whether to set LDAP_OPT_DEREF on this connection or not. |
| string | &$debuginfo | the debugging information in case the connection fails. |
Definition at line 163 of file ldaplib.php.

| ldap_filter_addslashes | ( | $ | text | ) |
Quote control characters in texts used in LDAP filters - see RFC 4515/2254
| string | filter string to quote |
Definition at line 299 of file ldaplib.php.

| ldap_find_userdn | ( | $ | ldapconnection, |
| $ | username, | ||
| $ | contexts, | ||
| $ | objectclass, | ||
| $ | search_attrib, | ||
| $ | search_sub | ||
| ) |
Search specified contexts for username and return the user dn like: cn=username,ou=suborg,o=org
| mixed | $ldapconnection | a valid LDAP connection. |
| mixed | $username | username (external LDAP encoding, no db slashes). |
| array | $contexts | contexts to look for the user. |
| string | $objectclass | objectlass of the user (in LDAP filter syntax). |
| string | $search_attrib | the attribute use to look for the user. |
| boolean | $search_sub | whether to search subcontexts or not. |
Definition at line 223 of file ldaplib.php.


| if (!defined('LDAP_DN_SPECIAL_CHARS')) if (!defined('LDAP_DN_SPECIAL_CHARS_QUOTED_NUM')) if (!defined('LDAP_DN_SPECIAL_CHARS_QUOTED_ALPHA')) ldap_get_dn_special_chars | ( | ) |
The order of the special characters in these arrays _IS IMPORTANT_. Make sure '\5C' (and '\') are the first elements of the arrays. Otherwise we'll double replace '\' with '\5C' which is Bad(tm)
Definition at line 321 of file ldaplib.php.

| ldap_get_entries_moodle | ( | $ | ldapconnection, |
| $ | searchresult | ||
| ) |
Returns values like ldap_get_entries but is binary compatible and returns all attributes as array.
| mixed | $ldapconnection | A valid LDAP connection |
| mixed | $searchresult | A search result from ldap_search, ldap_list, etc. |
Definition at line 266 of file ldaplib.php.

| ldap_getdefaults | ( | ) |
Initializes needed variables for ldap-module
Uses names defined in ldap_supported_usertypes. $default is first defined as: $default['pseudoname'] = array( 'typename1' => 'value', 'typename2' => 'value' .... );
Definition at line 54 of file ldaplib.php.

| ldap_isgroupmember | ( | $ | ldapconnection, |
| $ | userid, | ||
| $ | group_dns, | ||
| $ | member_attrib | ||
| ) |
Checks if user belongs to specific group(s) or is in a subtree.
Returns true if user belongs to a group in grupdns string OR if the DN of the user is in a subtree of the DN provided as "group"
| mixed | $ldapconnection | A valid LDAP connection. |
| string | $userid | LDAP user id (dn/cn/uid/...) to test membership for. |
| array | $group_dns | arrary of group dn |
| string | $member_attrib | the name of the membership attribute. |
Definition at line 113 of file ldaplib.php.


| ldap_stripslashes | ( | $ | text | ) |
Unquote control characters in distinguished names used in LDAP - See RFC 4514/2253
| string | The text quoted |
Definition at line 350 of file ldaplib.php.

| if (!defined('ROOTDSE')) ldap_supported_usertypes | ( | ) |
Returns predefined user types
Definition at line 30 of file ldaplib.php.
