Passwd_Driver_Servuftp
extends Passwd_Driver
in package
Changes a password via the SITE PSWD command used by Serv-u ftpd for Windows.
Tags
Table of Contents
- CONNECTED = '220'
- GOODBYE = '221'
- PASSWORDBAD = '530'
- PASSWORDOK = '230'
- USERNAMEOK = '331'
- $_fp : mixed
- $_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.
- _connect() : mixed
- _disconnect() : mixed
- _encryptPassword() : string
- Encrypts a password.
- _getPrompt() : mixed
- _sendCommand() : mixed
Constants
CONNECTED
public
mixed
CONNECTED
= '220'
GOODBYE
public
mixed
GOODBYE
= '221'
PASSWORDBAD
public
mixed
PASSWORDBAD
= '530'
PASSWORDOK
public
mixed
PASSWORDOK
= '230'
USERNAMEOK
public
mixed
USERNAMEOK
= '331'
Properties
$_fp
protected
mixed
$_fp
$_params
Hash containing configuration 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()
-
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 —_connect()
protected
_connect() : mixed
Tags
Return values
mixed —_disconnect()
protected
_disconnect() : mixed
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.
_getPrompt()
protected
_getPrompt() : mixed
Tags
Return values
mixed —_sendCommand()
protected
_sendCommand(mixed $cmd, mixed $arg) : mixed
Parameters
- $cmd : mixed
- $arg : mixed