PHP Class Passwd_Driver_Sql, horde

Author: Mike Cochrane ([email protected])
Author: Mattias Webjörn Eriksson ([email protected])
Author: Ilya Krel ([email protected])
Author: Eric Jon Rostetter ([email protected])
Author: Tjeerd van der Zee ([email protected])
Inheritance: extends Passwd_Driver
Show file Open project: horde/horde

Protected Properties

Property Type Description
$_db Horde_Db_Adapter Handle for the current database connection.

Public Methods

Method Description
__construct ( array $params = [] )

Protected Methods

Method Description
_changePassword ( $user, $oldpass, $newpass )
_lookup ( $user, string $oldpass ) Finds out if a username and password is valid.
_modify ( string $user, string $newpass ) Modifies a SQL password record for a user.
_parseQuery ( string $string, string $user, string $password ) : string Parses the string as an SQL query substituting placeholders for their values.

Method Details

__construct() public method

public __construct ( array $params = [] )
$params array Driver parameters: - db: (Horde_Db_Adapter; REQUIRED) A DB Adapter object. - encryption: (string) The encryption type. - pass_col: (string) The table column for password. - query_lookup: (string) Should we use a custom query for lookup? - query_modify: (string) Should we use a custom query for changing? - show_encryption: (boolean) Prepend the encryption type to the password? - table: (string) The name of the user database table. - user_col: (string) The table column for user name.

_changePassword() protected method

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

_lookup() protected method

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

_modify() protected method

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

_parseQuery() protected method

Parses the string as an SQL query substituting placeholders for their values.
protected _parseQuery ( string $string, string $user, string $password ) : string
$string string The string to process as a query.
$user string The user to use for the %u placeholder.
$password string The password to use for the %p and %e placeholders.
return string The processed SQL query.

Property Details

$_db protected property

Handle for the current database connection.
protected Horde_Db_Adapter $_db
return Horde_Db_Adapter