[ Index ]
 

Code source de Horde 3.1.3

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/Horde/Prefs/ -> ldap.php (sommaire)

Horde_String class.

Poids: 578 lignes (21 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Prefs_ldap:: (8 méthodes):
  Prefs_ldap()
  _connect()
  _disconnect()
  _rebindProc()
  retrieve()
  store()
  clear()
  cleanup()


Classe: Prefs_ldap  - X-Ref

Preferences storage implementation for PHP's LDAP extention.

Required parameters:<pre>
'basedn'    The base DN for the LDAP server.
'hostspec'  The hostname of the LDAP server.
'uid'       The username search key.</pre>

Optional parameters:<pre>
'password'  'rootdn's password for bind authentication.
'port'      The port of the LDAP server.
DEFAULT: 389
'rootdn'    The DN of the root (administrative) account to bind for
write operations.
'username'  TODO
'version'   The version of the LDAP protocol to use.
DEFAULT: NONE (system default will be used)</pre>

NOTE: parameter 'username' has been deprecated. Use 'rootdn'.


If setting up as the Horde preference handler in conf.php, the following
is an example configuration.
The schemas needed for ldap are in horde/scripts/ldap.

<pre>
$conf['prefs']['driver'] = 'ldap';
$conf['prefs']['params']['hostspec'] = 'localhost';
$conf['prefs']['params']['port'] = '389';
$conf['prefs']['params']['basedn'] = 'dc=example,dc=org';
$conf['prefs']['params']['uid'] = 'mail';
</pre>

The following is valid but would only be necessary if users
do NOT have permission to modify their own LDAP accounts.

<pre>
$conf['prefs']['params']['rootdn'] = 'cn=Manager,dc=example,dc=org';
$conf['prefs']['params']['password'] = 'password';
</pre>


$Horde: framework/Prefs/Prefs/ldap.php,v 1.85.10.20 2006/06/21 20:07:55 jan Exp $

Copyright 1999-2006 Jon Parise <jon@horde.org>

See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Prefs_ldap($user, $password, $scope = '',$params = array()   X-Ref
Constructs a new LDAP preferences object.

param: string $user      The user who owns these preferences.
param: string $password  The password associated with $user.
param: string $scope     The current application scope.
param: array $params     A hash containing connection parameters.
param: boolean $caching  Should caching be used?

_connect()   X-Ref
Opens a connection to the LDAP server.

return: mixed  True on success or a PEAR_Error object on failure.

_disconnect()   X-Ref
Disconnect from the LDAP server and clean up the connection.

return: boolean  True on success, false on failure.

_rebindProc($conn, $who)   X-Ref
Callback function for LDAP referrals.  This function is called when an
LDAP operation returns a referral to an alternate server.

return: integer  1 on error, 0 on success.

retrieve()   X-Ref
Retrieves the requested set of preferences from the user's LDAP entry.

return: mixed  True on success or a PEAR_Error object on failure.

store()   X-Ref
Stores preferences to the LDAP server.

return: mixed  True on success or a PEAR_Error object on failure.

clear()   X-Ref
Clears all preferences from the LDAP backend.


cleanup($all = false)   X-Ref
Perform cleanup operations.

param: boolean $all  Cleanup all Horde preferences.



Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7