\Horde_Block_Account_Ldap

The ldap class attempts to return user information stored in an ldap directory service.

Copyright 2001-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL-2). If you did not receive this file, see http://www.horde.org/licenses/lgpl.

Summary

Methods
Properties
Constants
__construct()
getUsername()
getQuota()
getFullname()
getHome()
getShell()
getPasswordChange()
checkPasswordStatus()
No public properties found
No constants found
_getMaxPasswd()
_convertWinTimeToUnix()
_getAccount()
$_params
$_ldap
$_information
N/A
No private methods found
No private properties found
N/A

Properties

$_params

$_params : array

Hash containing connection parameters.

Type

array

$_ldap

$_ldap : \Horde_Ldap

Pointer to the LDAP connection.

Type

\Horde_Ldap

$_information

$_information : array

User information hash.

Type

array

Methods

__construct()

__construct(array  $params = array()) 

Constructor.

Parameters

array $params

A hash containing connection parameters.

getUsername()

getUsername() : string

Returns the username.

Returns

string —

The lowercased username.

getQuota()

getQuota() : array

Returns the user's quota if available.

Returns

array —

A quota array, elements are used bytes and limit bytes.

getFullname()

getFullname() : string

Returns the user's full name.

Throws

\Horde_Exception

if user not found.

\Horde_Ldap_Exception

on LDAP errors.

Returns

string —

The user's full name.

getHome()

getHome() : string

Returns the user's home (login) directory.

Throws

\Horde_Exception

if user not found.

\Horde_Ldap_Exception

on LDAP errors.

Returns

string —

The user's directory.

getShell()

getShell() : string

Returns the user's default shell.

Throws

\Horde_Exception

if user not found.

\Horde_Ldap_Exception

on LDAP errors.

Returns

string —

The user's shell.

getPasswordChange()

getPasswordChange() : string

Returns the date of the user's last password change.

Throws

\Horde_Exception

if user not found.

\Horde_Ldap_Exception

on LDAP errors.

Returns

string —

Date string.

checkPasswordStatus()

checkPasswordStatus() : string

Returns the status of the current password.

Throws

\Horde_Exception

if user not found.

\Horde_Ldap_Exception

on LDAP errors.

Returns

string —

A string with a warning message if the password is about to expire.

_getMaxPasswd()

_getMaxPasswd() : integer|boolean

Returns the win32 AD epoch number of days the password may be unchanged.

Returns

integer|boolean —

Number of days or false if no limit.

_convertWinTimeToUnix()

_convertWinTimeToUnix(integer  $dateLargeInt) : integer

Code from 'brudinie at yahoo dot co dot uk' at http://nl3.php.net/ldap/

Parameters

integer $dateLargeInt

The win32 active directory epoch time.

Returns

integer —

A unix timestamp.

_getAccount()

_getAccount() : \Horde_Ldap_Entry

Returns the user account from the LDAP source.

Throws

\Horde_Exception

if user not found.

\Horde_Ldap_Exception

on LDAP errors.

Returns

\Horde_Ldap_Entry —

An entry with complete account details.