Свойство | Type | Description | |
---|---|---|---|
$_capabilities | array | An array of capabilities, so that the driver can report which operations it supports and which it doesn't. | |
$_db | Horde_Db_Adapter | Handle for the current database connection. |
Méthode | Description | |
---|---|---|
__construct ( array $params = [] ) | Constructor | |
addUser ( string $userId, array $credentials ) | Add a set of authentication credentials. | |
exists ( string $userId ) : boolean | Checks if a userId exists in the system. | |
listUsers ( boolean $sort = false ) : array | List all users in the system. | |
removeUser ( string $userId ) | Delete a set of authentication credentials. | |
resetPassword ( string $userId ) : string | Reset a user's password. Used for example when the user does not remember the existing password. | |
updateUser ( string $oldID, string $newID, array $credentials ) | Update a set of authentication credentials. |
Méthode | Description | |
---|---|---|
_authenticate ( string $userId, array $credentials ) | Find out if a set of login credentials are valid. | |
_comparePasswords ( string $encrypted, string $plaintext ) : boolean | Compare an encrypted password to a plaintext string to see if they match. |
Méthode | Description | |
---|---|---|
_calc_expiration ( string $type ) : integer | Calculate a timestamp and return it along with the field name |
public __construct ( array $params = [] ) | ||
$params | array | Parameters:
'db' - (Horde_Db_Adapter) [REQUIRED] Database object.
'encryption' - (string) The encryption to use to store the password in the table (e.g. plain, crypt, md5-hex, md5-base64, smd5, sha, ssha, aprmd5). DEFAULT: 'md5-hex' 'hard_expiration_field' - (string) The name of the field containing a date after which the account is no longer valid and the user will not be able to log in at all. DEFAULT: none 'password_field' - (string) The name of the password field in the auth table. DEFAULT: 'user_pass' 'show_encryption' - (boolean) Whether or not to prepend the encryption in the password field. DEFAULT: false 'soft_expiration_field' - (string) The name of the field containing a date after which the system will request the user change his or her password. DEFAULT: none 'table' - (string) The name of the SQL table to use in 'database'. DEFAULT: 'horde_users' 'username_field' - (string) The name of the username field in the auth table. DEFAULT: 'user_uid' |
protected _authenticate ( string $userId, array $credentials ) | ||
$userId | string | The userId to check. |
$credentials | array | The credentials to use. |
public removeUser ( string $userId ) | ||
$userId | string | The userId to delete. |
public resetPassword ( string $userId ) : string | ||
$userId | string | The user id for which to reset the password. |
Résultat | string | The new password on success. |
protected array $_capabilities | ||
Résultat | array |