Documentation

Horde_Block_Account_Localhost extends Horde_Block_Account_Base
in package

Implements the Accounts API for servers with unix accounts on the localhost machine (same machine as the web server). Should work for local unix accounts, nis/nis+ accounts, or any PAM oriented accounts that appear as local accounts on the local machine. The exception is the quota support.

See that routine for additional comments.

Copyright 2002-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.

Tags
author

Eric Jon Rostetter eric.rostetter@physics.utexas.edu

author

Jan Schneider jan@horde.org

Table of Contents

$_information  : array<string|int, mixed>
User information hash.
$_params  : array<string|int, mixed>
Hash containing connection parameters.
__construct()  : mixed
Constructor.
checkPasswordStatus()  : string
Returns the status of the current password.
getFullname()  : string
Returns the user's full name.
getHome()  : string
Returns the user's home (login) directory.
getPasswordChange()  : string
Returns the date of the user's last password change.
getQuota()  : array<string|int, mixed>
Returns the user's quota for servers with a unix quota command.
getShell()  : string
Returns the user's default shell.
getUsername()  : string
Returns the username.
_getAccount()  : array<string|int, mixed>
Returns the user account from the posix information.

Properties

$_information

User information hash.

protected array<string|int, mixed> $_information

$_params

Hash containing connection parameters.

protected array<string|int, mixed> $_params = array()

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
$params : array<string|int, mixed> = array()

Hash containing connection parameters.

Return values
mixed

checkPasswordStatus()

Returns the status of the current password.

public checkPasswordStatus() : string
Return values
string

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

getFullname()

Returns the user's full name.

public getFullname() : string
Tags
throws
Horde_Exception

if posix extension is missing.

Return values
string

The user's full name.

getHome()

Returns the user's home (login) directory.

public getHome() : string
Tags
throws
Horde_Exception

if posix extension is missing.

Return values
string

The user's directory.

getPasswordChange()

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

public getPasswordChange() : string
Return values
string

Date string.

getQuota()

Returns the user's quota for servers with a unix quota command.

public getQuota() : array<string|int, mixed>

This may require a modified "quota" command that allows the httpd server account to get quotas for other users... It requires that your web server and user server be the same server or at least have shared authentication and file servers (e.g. via NIS/NFS). And last, it (as written) requires the posix php extensions.

If your quota command wraps the output onto two lines, then this module will only work if you have a grep which supports the -A switch, and you append an -A1 switch to your grep_path (e.g. '/bin/grep -A1').

Tags
throws
Horde_Exception

if posix extension is missing.

Return values
array<string|int, mixed>

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

getShell()

Returns the user's default shell.

public getShell() : string
Tags
throws
Horde_Exception

if posix extension is missing.

Return values
string

The user's shell.

getUsername()

Returns the username.

public getUsername() : string
Return values
string

The lowercased username.

_getAccount()

Returns the user account from the posix information.

protected _getAccount() : array<string|int, mixed>
Tags
throws
Horde_Exception

if posix extension is missing.

Return values
array<string|int, mixed>

A hash with complete account details.

Search results