Passwd_Driver_Vpopmail
extends Passwd_Driver
in package
The vpopmail class attempts to change a user's password for vpopmail based servers. It is very similar to the more generic sql driver, and the two should probably be merged into one driver if possible.
Tags
Table of Contents
- $_connected : bool
- State of SQL connection.
- $_db : Horde_Db_Adapter
- The Horde_Db object.
- $_params : array<string|int, mixed>
- Hash containing configuration parameters.
- __construct() : mixed
- Constructor.
- changePassword() : mixed
- Changes the user's password.
- _changePassword() : mixed
- Changes the user's password.
- _comparePasswords() : mixed
- Compares a plaintext password with an encrypted password.
- _encryptPassword() : string
- Encrypts a password.
- _lookup() : mixed
- Finds out if a username and password is valid.
- _modify() : mixed
- Modifies a SQL password record for a user.
Properties
$_connected
State of SQL connection.
protected
bool
$_connected
= \false
$_db
The Horde_Db object.
protected
Horde_Db_Adapter
$_db
$_params
Hash containing configuration parameters.
protected
array<string|int, mixed>
$_params
= array()
Methods
__construct()
Constructor.
public
__construct([mixed $params = array() ]) : mixed
Parameters
- $params : mixed = array()
-
A hash containing connection parameters.
Return values
mixed —changePassword()
Changes the user's password.
public
changePassword(string $user, string $oldpass, string $newpass) : mixed
Parameters
- $user : string
-
The user for which to change the password.
- $oldpass : string
-
The old (current) user password.
- $newpass : string
-
The new user password to set.
Tags
Return values
mixed —_changePassword()
Changes the user's password.
protected
_changePassword(mixed $user, mixed $oldpass, mixed $newpass) : mixed
Parameters
- $user : mixed
-
The user for which to change the password (converted to backend username).
- $oldpass : mixed
-
The old (current) user password.
- $newpass : mixed
-
The new user password to set.
Return values
mixed —_comparePasswords()
Compares a plaintext password with an encrypted password.
protected
_comparePasswords(string $encrypted, string $plaintext) : mixed
Parameters
- $encrypted : string
-
An encrypted password.
- $plaintext : string
-
An unencrypted password.
Tags
Return values
mixed —_encryptPassword()
Encrypts a password.
protected
_encryptPassword(string $plaintext) : string
Parameters
- $plaintext : string
-
A plaintext password.
Return values
string —The encrypted password.
_lookup()
Finds out if a username and password is valid.
protected
_lookup(string $user, string $oldpass) : mixed
Parameters
- $user : string
-
The username to check.
- $oldpass : string
-
An old password to check.
Tags
Return values
mixed —_modify()
Modifies a SQL password record for a user.
protected
_modify(string $user, string $newpass) : mixed
Parameters
- $user : string
-
The user whose record we will udpate.
- $newpass : string
-
The new password value to set.