PHP Class Passwd_Driver_Pine, horde

Author: Max Kalika ([email protected])
Inheritance: extends Passwd_Driver
Show file Open project: horde/horde

Protected Properties

Property Type Description
$_connected boolean Boolean which contains state of the ftp connection.
$_contents array Contents array of the pine password file.
$_ftp VFS Horde_Vfs instance.

Public Methods

Method Description
__construct ( array $params = [] )

Protected Methods

Method Description
_changePassword ( $user, $oldpass, $newpass )
_connect ( $user, $password ) Connects to the FTP server.
_decode ( string $string ) : array Decodes a Pine-encoded password string.
_disconnect ( ) Disconnect from the FTP server.
_encode ( array $lines ) : array Encodes an array of elements into a Pine-readable password string.
_lookup ( string $user, string $oldPassword ) Finds out if a username and password is valid.
_modify ( string $user, string $newPassword ) Modifies a pine password record for a user.

Method Details

__construct() public method

public __construct ( array $params = [] )
$params array

_changePassword() protected method

protected _changePassword ( $user, $oldpass, $newpass )

_connect() protected method

Connects to the FTP server.
protected _connect ( $user, $password )

_decode() protected method

The algorithm is borrowed from read_passfile() and xlate_out() functions in pine/imap.c file distributed in the Pine source archive.
protected _decode ( string $string ) : array
$string string The contents of a pine-encoded password file.
return array List of lines of decoded elements.

_disconnect() protected method

Disconnect from the FTP server.
protected _disconnect ( )

_encode() protected method

The algorithm is borrowed from write_passfile() and xlate_in() functions in pine/imap.c file distributed in the Pine source archive.
protected _encode ( array $lines ) : array
$lines array List of lines of decoded elements.
return array Contents of a pine-readable password file.

_lookup() protected method

Finds out if a username and password is valid.
protected _lookup ( string $user, string $oldPassword )
$user string The userID to check.
$oldPassword string An old password to check.

_modify() protected method

Modifies a pine password record for a user.
protected _modify ( string $user, string $newPassword )
$user string The user whose record we will udpate.
$newPassword string The new password value to set.

Property Details

$_connected protected property

Boolean which contains state of the ftp connection.
protected bool $_connected
return boolean

$_contents protected property

Contents array of the pine password file.
protected array $_contents
return array

$_ftp protected property

Horde_Vfs instance.
protected VFS $_ftp
return VFS