Class Vacation_Driver_ldap

Description

Vacation_Driver_ldap:: implements the Vacation_Driver API for LDAP-compliant mail servers (such as Exim).

Parameters: (required)

  • host - hostname of the LDAP server
  • port - port number of the LDAP service
  • basedn - base DN of the user directory
  • uid - attribute to use for uid
  • vacation - attribute to use for storing the vacation message
  • active - attribute which determines if the vacation message is active
(optional)
  • userdn - another way of specifying the user DN (instead of constructing it from uid+basedn).
  • version - Protocol version for the LDAP server (PHP defaults to version 2. OpenLDAP >= 2.1.4 uses version 3, and so must be set explicitly).
$Horde: vacation/lib/Driver/ldap.php,v 1.17.2.15 2009/04/04 10:10:55 jan Exp $

Copyright 2001-2009 The Horde Project (http://www.horde.org/)

See the enclosed file LICENSE for license information (BSD). If you did not receive this file, see http://www.horde.org/licenses/bsdl.php.

Located in /lib/Driver/ldap.php (line 31)

Vacation_Driver
   |
   --Vacation_Driver_ldap
Variable Summary
 mixed $_ds
Method Summary
 void setVacation (string $password, string $message, string $subject, string $from, [string $alias = ''])
 void unsetVacation (string $password)
 void _checkConfig ()
 boolean _connect ([string $userdn = null], [string $password = null])
 void _disconnect ()
 array _getUserDetails (string $password)
 void _getVacation ( $userdn)
 string _lookupdn ()
 void _setVacationAlias (string $userdn)
 void _unsetVacationAlias (string $userdn)
Variables
Methods
setVacation (line 47)

Sets up vacation notices for a user.

void setVacation (string $password, string $message, string $subject, string $from, [string $alias = ''])
  • string $password: The password for the user.
  • string $message: The text of the vacation notice.
  • string $subject: The subject of the vacation notice.
  • string $from: The From: address of the vacation notice.
  • string $alias: The alias email address.

Redefinition of:
Vacation_Driver::setVacation()
Sets up vacation notices for a user.
unsetVacation (line 121)

Deactivates the vacation notice.

This does not delete the vacation message, just marks it as disabled.

void unsetVacation (string $password)
  • string $password: The password of the user.

Redefinition of:
Vacation_Driver::unsetVacation()
Disables vacation notices for a user.
_checkConfig (line 273)

Check if the realm has a specific configuration. If not, try to fall back on the default configuration. If still not a valid configuration then exit with an error.

void _checkConfig ()
_connect (line 336)

Connects to the LDAP server and binds as the guest user or as the optional userdn.

  • return: True on success, PEAR_Error otherwise.
boolean _connect ([string $userdn = null], [string $password = null])
  • string $userdn: The DN to use when binding non-anonymously.
  • string $password: The password for $userdn.
_disconnect (line 369)

Close the ldap connection.

void _disconnect ()
_getUserDetails (line 184)

Retrieves the current vacation details for the user.

  • return: Vacation details or PEAR_Error on failure.
array _getUserDetails (string $password)
  • string $password: The password for user.

Redefinition of:
Vacation_Driver::_getUserDetails()
Retrieves the current vacation details for the user.
_getVacation (line 223)
void _getVacation ( $userdn)
  • $userdn
_lookupdn (line 293)

Lookup and return the user's dn.

  • return: The LDAP dn for the user.
string _lookupdn ()
_setVacationAlias (line 109)

Sets or creates a vacation mail alias.

Some MTA/LDAP/Vacation implementations require an extra mail alias (ex. user@example.org -> user@example.org, user@autoreply.example.org)

You should override this method in your extended LDAP driver class, if you need this feature.

void _setVacationAlias (string $userdn)
  • string $userdn: The LDAP DN for the current user.
_unsetVacationAlias (line 172)

Unsets or removes a vacation mail alias.

void _unsetVacationAlias (string $userdn)
  • string $userdn: The LDAP DN for the current user.

Inherited Methods

Inherited From Vacation_Driver

 Vacation_Driver::Vacation_Driver()
 Vacation_Driver::currentFrom()
 Vacation_Driver::currentMessage()
 Vacation_Driver::currentSubject()
 Vacation_Driver::factory()
 Vacation_Driver::getFrom()
 Vacation_Driver::getParam()
 Vacation_Driver::getUser()
 Vacation_Driver::hasCapability()
 Vacation_Driver::isEnabled()
 Vacation_Driver::setVacation()
 Vacation_Driver::unsetVacation()
 Vacation_Driver::_buildMessage()
 Vacation_Driver::_encryptPassword()
 Vacation_Driver::_getUserDetails()
 Vacation_Driver::_makeEmailAddress()
 Vacation_Driver::_parseMessage()
 Vacation_Driver::_processMessage()

Documentation generated on Sun, 30 Jan 2011 05:40:31 +0000 by phpDocumentor 1.4.3