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

Class: LDAPserver

Source Location: /lib/server_functions.php

Class Overview




Methods



Class Details

[line 14]


[ Top ]


Class Methods


constructor __construct [line 43]

LDAPserver __construct( int $server_id)

Default constructor.



Parameters:

int   $server_id   the server_id of the LDAP server as defined in config.php

[ Top ]

method add [line 1450]

void add( $dn, $entry_array)

Add objects



Parameters:

   $dn  
   $entry_array  

[ Top ]

method attrDelete [line 1483]

void attrDelete( $dn, $update_array)



Parameters:

   $dn  
   $update_array  

[ Top ]

method attrModify [line 1478]

void attrModify( $dn, $update_array)

Modify attributes



Parameters:

   $dn  
   $update_array  

[ Top ]

method attrReplace [line 1488]

void attrReplace( $dn, $update_array)



Parameters:

   $dn  
   $update_array  

[ Top ]

method checkUniqueAttr [line 2721]

void checkUniqueAttr( dn $dn, string $attr_name, $new_value, string|array $new)

This function will check whether the value for an attribute being changed is already assigned to another DN.

Inputs:




Parameters:

dn   $dn   DN that is being changed
string   $attr_name   Attribute being changed
string|array   $new  

values New values for the attribute

Returns the bad value, or null if all values are OK

   $new_value  

[ Top ]

method connect [line 112]

resource|false connect( [bool $process_error = true], [bool $connect_id = 'user'], [bool $reconnect = false], [ $readonly = true], [ $dn = null], [ $pass = null])

Connect to the LDAP server.



Tags:

return:  Connection resource to LDAP server, or false if no connection made.


Parameters:

bool   $process_error   Whether to call an error page, if the connection fails
bool   $connect_id   The ID for this connection
bool   $reconnect   Use a cached connetion, or create a new one.
   $readonly  
   $dn  
   $pass  

[ Top ]

method delete [line 1496]

void delete( $dn)

Delete objects



Parameters:

   $dn  

[ Top ]

method dnExists [line 1562]

bool dnExists( string $dn)

Gets whether an entry exists based on its DN. If the entry exists, returns true. Otherwise returns false.

If we are not aware of the dn, and a read results in a hit, then we'll update the info for the tree.




Parameters:

string   $dn   The DN of the entry of interest.

[ Top ]

method errno [line 1548]

void errno( )

Return errno from last operation



[ Top ]

method error [line 1540]

void error( )

Return error from last operation



[ Top ]

method getBaseDN [line 384]

array getBaseDN( )

Gets the root DN of the specified LDAPServer, or null if it can't find it (ie, the server won't give it to us, or it isnt specified in the configuration file).

Tested with OpenLDAP 2.0, Netscape iPlanet, and Novell eDirectory 8.7 (nldap.com) Please report any and all bugs!!

Please note: On FC systems, it seems that php_ldap uses /etc/openldap/ldap.conf in the search base if it is blank - so edit that file and comment out the BASE line.




Tags:

return:  dn|null The root DN of the server on success (string) or null on error.
todo:  Sort the entries, so that they are in the correct DN order.


[ Top ]

method getContainerContents [line 1641]

array getContainerContents( string $dn, [int $size_limit = 0], [string $filter = '(objectClass=*)'], [ $deref = LDAP_DEREF_ALWAYS])

Gets a list of child entries for an entry. Given a DN, this function fetches the list of DNs of child entries one level beneath the parent. For example, for the following tree:

  1.     dc=example,dc=com
  2.         ou=People
  3.             cn=Dave
  4.             cn=Fred
  5.             cn=Joe
  6.         ou=More People
  7.             cn=Mark
  8.             cn=Bob

Calling

  1. getContainerContents("ou=people,dc=example,dc=com")
would return the following list:

  1.     cn=Dave
  2.     cn=Fred
  3.     cn=Joe
  4.     ou=More People




Tags:

return:  An array of DN strings listing the immediate children of the specified entry.


Parameters:

string   $dn   The DN of the entry whose children to return.
int   $size_limit   (optional) The maximum number of entries to return. If unspecified, no limit is applied to the number of entries in the returned.
string   $filter   (optional) An LDAP filter to apply when fetching children, example: "(objectClass=inetOrgPerson)"
   $deref  

[ Top ]

method getContainerParent [line 2656]

string getContainerParent( $container, string $path, string $dn)

Given a DN string and a path like syntax, this returns the parent container portion of the string.



Tags:

return:  The container
see:  get_container()
see:  get_rdn()


Parameters:

string   $dn   The DN whose container string to return.
string   $path   Either '/', '.' or something like '../../<rdn>'
   $container  

[ Top ]

method getContainerTop [line 2633]

string getContainerTop( string $dn)

Given a DN string, this returns the top container portion of the string.



Tags:

return:  The container
see:  get_container()
see:  get_rdn()


Parameters:

string   $dn   The DN whose container string to return.

[ Top ]

method getDNAttr [line 2611]

array getDNAttr( string $dn, string $attr, [bool $lower_case_attr_names = false], [int $deref = LDAP_DEREF_NEVER])

Much like getDNAttrs(), but only returns the values for one attribute of an object. Example calls:

  1.     print_rgetDNAttr0"cn=Bob,ou=people,dc=example,dc=com""sn" ) );
  2.     Array (
  3.         [0=> "Smith"
  4.     )
  5.  
  6.  print_rgetDNAttr0"cn=Bob,ou=people,dc=example,dc=com""objectClass" ) );
  7.     Array (
  8.         [0=> "top"
  9.         [1=> "person"
  10.     )




Tags:



Parameters:

string   $dn   The distinguished name (DN) of the entry whose attributes/values to fetch.
string   $attr   The attribute whose value(s) to return (ie, "objectClass", "cn", "userPassword")
bool   $lower_case_attr_names   (optional) If true, all keys of the returned associative array will be lower case. Otherwise, they will be cased as the LDAP server returns them.
int   $deref   For aliases and referrals, this parameter specifies whether to follow references to the referenced DN or to fetch the attributes for the referencing DN. See http://php.net/ldap_search for the 4 valid options.

[ Top ]

method getDNAttrs [line 2549]

array getDNAttrs( string $dn, [bool $lower_case_attr_names = false], [int $deref = LDAP_DEREF_NEVER])

Gets the attributes/values of an entry. Returns an associative array whose

keys are attribute value names and whose values are arrays of values for said attribute. Optionally, callers may specify true for the parameter $lower_case_attr_names to force all keys in the associate array (attribute names) to be lower case.

Sample return value of

  1. getDNAttrs0"cn=Bob,ou=pepole,dc=example,dc=com" )

  1.     Array (
  2.         [objectClass=> Array (
  3.             [0=> person
  4.             [1=> top
  5.         )
  6.         [cn=> Array (
  7.             [0=> Bob
  8.         )
  9.         [sn=> Array (
  10.             [0=> Jones
  11.         )
  12.         [dn=> Array (
  13.             [0=> cn=Bob,ou=pepole,dc=example,dc=com
  14.         )
  15.     )




Tags:



Parameters:

string   $dn   The distinguished name (DN) of the entry whose attributes/values to fetch.
bool   $lower_case_attr_names   (optional) If true, all keys of the returned associative array will be lower case. Otherwise, they will be cased as the LDAP server returns them.
int   $deref   For aliases and referrals, this parameter specifies whether to follow references to the referenced DN or to fetch the attributes for the referencing DN. See http://php.net/ldap_search for the 4 valid options.

[ Top ]

method getDNBase [line 2888]

string getDNBase( string $dn)

Get the LDAP base DN for a named DN.



Parameters:

string   $dn   DN in question

[ Top ]

method getDNSysAttrs [line 2487]

array getDNSysAttrs( string $dn, [int $deref = LDAP_DEREF_NEVER])

Gets the operational attributes for an entry. Given a DN, this function fetches that entry's

operational (ie, system or internal) attributes. These attributes include "createTimeStamp", "creatorsName", and any other attribute that the LDAP server sets automatically. The returned associative array is of this form:

  1.     Array (
  2.         [creatorsName=> Array (
  3.             [0=> "cn=Admin,dc=example,dc=com"
  4.         )
  5.         [createTimeStamp]=> Array (
  6.             [0=> "10401040130"
  7.         )
  8.         [hasSubordinates=> Array (
  9.             [0=> "FALSE"
  10.         )
  11.     )




Tags:

return:  An associative array whose keys are attribute names and whose values are arrays of values for the aforementioned attribute.


Parameters:

string   $dn   The DN of the entry whose interal attributes are desired.
int   $deref   For aliases and referrals, this parameter specifies whether to follow references to the referenced DN or to fetch the attributes for the referencing DN. See http://php.net/ldap_search for the 4 valid options.

[ Top ]

method getLoggedInDN [line 2356]

string getLoggedInDN( )

Returns the DN who is logged in currently to the given server, which may either be a DN or the string 'anonymous'. This applies only for auth_types "cookie", "session" and "http".

One place where this function is used is the tree viewer: After a user logs in, the text "Logged in as: " is displayed under the server name. This information is retrieved from this function.




Tags:

see:  LDAPserver::getLoggedInPass()
see:  have_auth_info


[ Top ]

method getLoggedInPass [line 2296]

string getLoggedInPass( )

Fetches the password of the currently logged in user (for auth_types "cookie", "session" and "http" only) or false if the current login is anonymous.



Tags:

see:  LDAPserver::getLoggedInDN()
see:  have_auth_info


[ Top ]

method getLoginAttr [line 912]

void getLoginAttr( )

Return the attribute used for login



[ Top ]

method getLoginString [line 977]

string|false getLoginString( )

Fetches the login_attr string if enabled for a specified server.

This is configured in config.php thus:

  1.     $ldapservers->SetValue($i,'login','login_string','uid=<username>,ou=People,dc=example,dc=com');




[ Top ]

method getRawSchema [line 674]

array getRawSchema( string $schema_to_fetch, [dn $dn = ''])

Fetches the raw schema array for the subschemaSubentry of the server. Note, this function has grown many hairs to accomodate more LDAP servers. It is needfully complicated as it now supports many popular LDAP servers that don't necessarily expose their schema "the right way".

Please note: On FC systems, it seems that php_ldap uses /etc/openldap/ldap.conf in the search base if it is blank - so edit that file and comment out the BASE line.




Tags:

return:  an array of strings of this form: Array ( [0] => "(1.3.6.1.4.1.7165.1.2.2.4 NAME 'gidPool' DESC 'Pool ... [1] => "(1.3.6.1.4.1.7165.2.2.3 NAME 'sambaAccount' DESC 'Sa ... etc.


Parameters:

string   $schema_to_fetch   - A string indicating which type of schema to fetch. Five valid values: 'objectclasses', 'attributetypes', 'ldapsyntaxes', 'matchingruleuse', or 'matchingrules'. Case insensitive.
dn   $dn   (optional) This paremeter is the DN of the entry whose schema you would like to fetch. Entries have the option of specifying their own subschemaSubentry that points to the DN of the system schema entry which applies to this attribute. If unspecified, this will try to retrieve the schema from the RootDSE subschemaSubentry. Failing that, we use some commonly known schema DNs. Default value is the Root DSE DN (zero-length string)

[ Top ]

method getSchemaAttribute [line 1138]

AttributeType getSchemaAttribute( $attr_name, [string $dn = null], string $oclass_name)

Gets a single AttributeType object specified by name.



Tags:

return:  The specified AttributeType object or false on error.
see:  LDAPserver::SchemaAttributes()
see:  AttributeType


Parameters:

string   $oclass_name   The name of the AttributeType to fetch.
string   $dn   (optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).
   $attr_name  

[ Top ]

method getSchemaDN [line 570]

array|false getSchemaDN( [ $dn = ''])

This function will query the ldap server and request the subSchemaSubEntry which should be the Schema DN.

If we cant connect to the LDAP server, we'll return false. If we can connect but cant get the entry, then we'll return null.




Tags:

return:  Schema if available, null if its not or false if we cant connect.


Parameters:

   $dn  

[ Top ]

method getSchemaObjectClass [line 1112]

ObjectClass getSchemaObjectClass( string $oclass_name, [string $dn = ''])

Gets a single ObjectClass object specified by name.



Tags:

return:  The specified ObjectClass object or false on error.
see:  LDAPserver::SchemaObjectClasses()
see:  ObjectClass


Parameters:

string   $oclass_name   The name of the objectClass to fetch.
string   $dn   (optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).

[ Top ]

method haveAuthInfo [line 70]

bool haveAuthInfo( )

Check if there is sufficent information to Authenticate to the LDAP server.

Given a server, returns whether or not we have enough information to authenticate against the server. For example, if the user specifies auth_type of 'cookie' in the config for that server, it checks the $_COOKIE array to see if the cookie username and password is set for the server. If the auth_type is 'session', the $_SESSION array is checked. If the auth_type is 'http', the $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] is checked.

There are three cases for this function depending on the auth_type configured for the specified server. If the auth_type is session or cookie or http, then getLoggedInDN() is called to verify that the user has logged in. If the auth_type is config, then the $ldapservers configuration in config.php is checked to ensure that the user has specified login information. In any case, if phpLDAPadmin has enough information to login to the server, true is returned. Otherwise false is returned.




Tags:



[ Top ]

method isAnonBindAllowed [line 994]

bool isAnonBindAllowed( )

Fetch whether the user has configured a certain server login to be non anonymous

  1.     $ldapservers->SetValue($i,'login','anon_bind','true|false');




[ Top ]

method isAttrBinary [line 2116]

bool isAttrBinary( string $attr_name)

Given an attribute name and server ID number, this function returns whether the attrbiute may contain binary data. This is useful for developers who wish to display the contents of an arbitrary attribute but don't want to dump binary data on the page.



Tags:



Parameters:

string   $attr_name   The name of the attribute to test.

[ Top ]

method isAttrBoolean [line 2090]

bool isAttrBoolean( string $attr_name)

Given an attribute name and server ID number, this function returns whether the attrbiute contains boolean data. This is useful for developers who wish to display the contents of a boolean attribute with a drop-down.



Parameters:

string   $attr_name   The name of the attribute to test.

[ Top ]

method isAttrHidden [line 2246]

bool isAttrHidden( string $attr)

Returns true if the specified attribute is configured as hidden in config.php with the $hidden_attrs array or the $hidden_attrs_ro array.

Attributes are configured as hidden in config.php thus:

  1.     $hidden_attrs array"objectClass""givenName" );
or
  1.     $hidden_attrs_ro array"objectClass""givenName""shadowWarning",
  2.         "shadowLastChange""shadowMax""shadowFlag",
  3.         "shadowInactive""shadowMin""shadowExpire" );




Parameters:

string   $attr   The name of the attribute to test.

[ Top ]

method isAttrReadOnly [line 2200]

bool isAttrReadOnly( string $attr)

Returns true if the specified attribute is configured as read only in config.php with the $read_only_attrs array.

Attributes are configured as read-only in config.php thus:

  1.     $read_only_attrs array"objectClass""givenName" );




Parameters:

string   $attr   The name of the attribute to test.

[ Top ]

method isBranchRenameEnabled [line 1037]

bool isBranchRenameEnabled( int $server_id)

Returns true if the user has configured the specified server to enable branch (non-leaf) renames.

This is configured in config.php thus:

  1.     $ldapservers->SetValue($i,'server','branch_rename','true|false');




Parameters:

int   $server_id   The ID of the server of interest from config.php.

[ Top ]

method isDNAttr [line 1877]

bool isDNAttr( string $attr_name)

Returns true if the attribute specified is required to take as input a DN.

Some examples include 'distinguishedName', 'member' and 'uniqueMember'.




Parameters:

string   $attr_name   The name of the attribute of interest (case insensitive)

[ Top ]

method isJpegPhoto [line 2059]

bool isJpegPhoto( string $attr_name)

Used to determine if the specified attribute is indeed a jpegPhoto. If the specified attribute is one that houses jpeg data, true is returned. Otherwise this function returns false.



Tags:



Parameters:

string   $attr_name   The name of the attribute to test.

[ Top ]

method isLoginAttrEnabled [line 930]

bool isLoginAttrEnabled( )

Fetches whether the login_attr feature is enabled for a specified server.

This is configured in config.php thus:

  1.     $ldapservers->SetValue($i,'login','attr','<ldap attr>');

By virtue of the fact that the login_attr is not blank and not 'dn', the feature is configured to be enabled.




[ Top ]

method isLoginStringEnabled [line 952]

bool isLoginStringEnabled( )

Fetches whether the login_attr feature is enabled for a specified server.

This is configured in config.php thus:

  1.     $ldapservers->SetValue($i,'login','attr','string');




[ Top ]

method isLowBandwidth [line 533]

bool isLowBandwidth( )

Fetch whether the user has configured a certain server as "low bandwidth".

Users may choose to configure a server as "low bandwidth" in config.php thus:

  1.     $ldapservers->SetValue($i,'server','low_bandwidth','true|false');




[ Top ]

method isMassDeleteEnabled [line 485]

bool isMassDeleteEnabled( )

Returns true if the user has configured the specified server to enable mass deletion.

Mass deletion is enabled in config.php this:

  1.     $config->custom->commands['all'array('entry_delete' => array('mass_delete' => true));
Notice that mass deletes are not enabled on a per-server basis, but this function checks that the server is not in a read-only state as well.




[ Top ]

method isMultiLineAttr [line 1833]

bool isMultiLineAttr( string $attr_name, [string $val = null])

Determines if an attribute's value can contain multiple lines. Attributes that fall in this multi-line category may be configured in config.php. Hence, this function accesses the global variable $_SESSION[APPCONFIG]->custom->appearance['multi_line_attributes'];

Usage example:

  1.     if ($ldapserver->isMultiLineAttr('postalAddress'))
  2.         echo "<textarea name=\"postalAddress\"></textarea>";
  3.     else
  4.         echo "<input name=\"postalAddress\" type=\"text\">";




Parameters:

string   $attr_name   The name of the attribute of interestd (case insensivite)
string   $val   (optional) The current value of the attribute (speeds up the process by searching for carriage returns already in the attribute value)

[ Top ]

method isReadOnly [line 455]

bool isReadOnly( )

Returns true if the specified server is configured to be displayed in read only mode.

If a user has logged in via anonymous bind, and config.php specifies

  1.     $config->custom->appearance['anonymous_bind_implies_read_only'true;
then this also returns true. Servers can be configured read-only in config.php thus:
  1.     $ldapservers->SetValue($i,'server','read_only',false);




[ Top ]

method isShowCreateEnabled [line 514]

bool isShowCreateEnabled( )

Gets whether the admin has configured phpLDAPadmin to show the "Create New" link in the tree viewer.

  1.     $ldapservers->SetValue($i,'appearance','show_create','true|false');
If NOT set, then default to show the Create New item. If IS set, then return the value (it should be true or false).

The entry creation command must be available.

  1.     $config->custom->commands['all'array('entry_create' => true);




Tags:

return:  True if the feature is enabled and false otherwise.


[ Top ]

method isTLSEnabled [line 1018]

bool isTLSEnabled( )

Fetches whether TLS has been configured for use with a certain server.

Users may configure phpLDAPadmin to use TLS in config,php thus:

  1.     $ldapservers->SetValue($i,'login','tls','true|false');




[ Top ]

method isUniqueAttr [line 2696]

bool isUniqueAttr( $attr_name)

Determins if the specified attribute is contained in the $unique_attrs list configured in config.php.



Tags:

return:  True if the specified attribute is in the $unique_attrs list and false otherwise.


Parameters:

   $attr_name  

[ Top ]

method isVisible [line 550]

bool isVisible( )

Should this LDAP server be shown in the tree?

  1.     $ldapservers->SetValue($i,'server','visible','true|false');




Tags:

return:  True if the feature is enabled and false otherwise.


[ Top ]

method MatchingRules [line 1342]

void MatchingRules( [ $dn = null])

Returns an array of MatchingRule objects for the specified server.

The key of each entry is the OID of the matching rule.




Parameters:

   $dn  

[ Top ]

method modify [line 1470]

void modify( $dn, $update_array)

Modify objects



Parameters:

   $dn  
   $update_array  

[ Top ]

method rename [line 1519]

void rename( $dn, $new_rdn, $container, $deleteoldrdn)

Rename objects



Parameters:

   $dn  
   $new_rdn  
   $container  
   $deleteoldrdn  

[ Top ]

method SchemaAttributes [line 1163]

array SchemaAttributes( [string $dn = null], int $server_id)

Gets an associative array of AttributeType objects for the specified server. Each array entry's key is the name of the attributeType in lower-case and the value is an AttributeType object.



Tags:

return:  An array of AttributeType objects.


Parameters:

int   $server_id   The ID of the server whose AttributeTypes to fetch
string   $dn   (optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).

[ Top ]

method SchemaObjectClasses [line 1056]

array SchemaObjectClasses( [string $dn = ''])

Gets an associative array of ObjectClass objects for the specified server. Each array entry's key is the name of the objectClass in lower-case and the value is an ObjectClass object.



Tags:

return:  An array of ObjectClass objects.
see:  LDAPserver::getSchemaObjectClass()
see:  ObjectClass


Parameters:

string   $dn   (optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).

[ Top ]

method SchemaSyntaxes [line 1411]

void SchemaSyntaxes( [ $dn = null])

Returns an array of Syntax objects that this LDAP server uses mapped to their descriptions. The key of each entry is the OID of the Syntax.



Parameters:

   $dn  

[ Top ]

method search [line 1704]

void search( [resource $resource = null], [string $base_dn = null], string $filter, [array $attrs = array()], [string $scope = 'sub'], [bool $sort_results = true], [int $deref = LDAP_DEREF_NEVER], [int $size_limit = 0])

A handy ldap searching function very similar to PHP's ldap_search() with the following exceptions: Callers may specify a search scope and the return value is an array containing the search results rather than an LDAP result resource.

Example usage:

  1.  $samba_users $ldapserver->search(null,"ou=People,dc=example,dc=com",
  2.     "(&(objectClass=sambaAccount)(objectClass=posixAccount))",
  3.     array("uid","homeDirectory"));
  4.  print_r$samba_users );
  5.  
  6.  // prints (for example):
  7.  //    Array (
  8.  //        [uid=jsmith,ou=People,dc=example,dc=com] => Array (
  9.  //            [dn] => "uid=jsmith,ou=People,dc=example,dc=com"
  10.  //            [uid] => "jsmith"
  11.  //            [homeDirectory] => "\\server\jsmith"
  12.  //        )
  13.  //        [uid=byoung,ou=People,dc=example,dc=com] => Array (
  14.  //            [dn] => "uid=byoung,ou=Samba,ou=People,dc=example,dc=com"
  15.  //            [uid] => "byoung"
  16.  //            [homeDirectory] => "\\server\byoung"
  17.  //        )
  18.  

WARNING: This function will use a lot of memory on large searches since the entire result set is stored in a single array. For large searches, you should consider sing the less memory intensive PHP LDAP API directly (ldap_search(), ldap_next_entry(), ldap_next_attribute(), etc).




Parameters:

resource   $resource   If an existing LDAP results should be used.
string   $filter   The LDAP filter to use when searching (example: "(objectClass=*)") (see RFC 2254)
string   $base_dn   The DN of the base of search.
array   $attrs   An array of attributes to include in the search result (example: array( "objectClass", "uid", "sn" )).
string   $scope   The LDAP search scope. Must be one of "base", "one", or "sub". Standard LDAP search scope.
bool   $sort_results   Specify false to not sort results by DN or true to have the returned array sorted by DN (uses ksort) or an array of attribute names to sort by attribute values
int   $deref   When handling aliases or referrals, this specifies whether to follow referrals. Must be one of LDAP_DEREF_ALWAYS, LDAP_DEREF_NEVER, LDAP_DEREF_SEARCHING, or LDAP_DEREF_FINDING. See the PHP LDAP API for details.
int   $size_limit   Size limit for search

[ Top ]

method setLoginDN [line 1929]

bool setLoginDN( string $dn, string $password, bool $anon_bind)

Responsible for setting two cookies/session-vars to indicate that a user has logged in, one for the logged in DN and one for the logged in password.

This function is only used if 'auth_type' is set to 'cookie' or 'session'. The values written have the name "pla_login_dn_X" and "pla_login_pass_X" where X is the ID of the server to which the user is attempting login.

Note that as with all cookie/session operations this function must be called BEFORE any output is sent to the browser.

On success, true is returned. On failure, false is returned.




Tags:



Parameters:

string   $dn   The DN with which the user has logged in.
string   $password   The password of the user logged in.
bool   $anon_bind   Indicates that this is an anonymous bind such that a password of "0" is stored.

[ Top ]

method unsetLoginDN [line 1988]

bool unsetLoginDN( )

Log a user out of the LDAP server.

Removes the cookies/session-vars set by setLoginDN() after a user logs out using "auth_type" of "session" or "cookie". Returns true on success, false on failure.




Tags:

return:  True on success, false on failure.
see:  LDAPserver::setLoginDN()


[ Top ]

method userIsAllowedLogin [line 2821]

void userIsAllowedLogin( $user)



Parameters:

   $user  

[ Top ]

method userIsMember [line 2787]

bool userIsMember( string $user, dn $group)

This function will test if a user is a member of a group.

Inputs:




Tags:

return:  true|false


Parameters:

string   $user   membership value that is being checked
dn   $group   DN to see if user is a member

[ Top ]


Documentation generated on Sun, 30 Dec 2007 17:50:49 -0800 by phpDocumentor 1.3.1