$_capabilities
$_capabilities : array
An array of capabilities, so that the driver can report which operations it supports and which it doesn't.
The Horde_Auth_Sql class provides a SQL implementation of the Horde authentication system.
The table structure for the Auth system needs to be created with the shipped migration scripts. See "horde-db-migrate-component --help" for details.
__construct(array $params = array())
Constructor
| array | $params | 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'
|
authenticate(string $userId, array $credentials, boolean $login = true) : boolean
Finds out if a set of login credentials are valid, and if requested, mark the user as logged in in the current session.
| string | $userId | The userId to check. |
| array | $credentials | The credentials to check. |
| boolean | $login | Whether to log the user in. If false, we'll only test the credentials and won't modify the current session. Defaults to true. |
Whether or not the credentials are valid.
isLocked(string $userId, boolean $show_details = false) : boolean|array
Returns whether a user is currently locked.
| string | $userId | The user to check. |
| boolean | $show_details | Return timeout too? |
If $show_details is a true, an array with 'locked' and 'lock_timeout' values. Whether the user is locked, otherwise.
transparent() : boolean
Automatic authentication.
Transparent authentication should set 'userId', 'credentials', or 'params' in $this->_credentials as needed - these values will be used to set the credentials in the session.
Transparent authentication should normally never throw an error - false should be returned.
Whether transparent login is supported.
getCredential(mixed $name = null) : mixed
Returns internal credential value(s).
| mixed | $name | The credential value to get. If null, will return the entire credential list. Valid names:
|
The credential information, or null if the credential doesn't exist.
_sort(array $users, boolean $sort) : array
Basic sort implementation.
If the backend has listUsers and doesn't have a native sorting option, fall back to this method.
| array | $users | An array of usernames. |
| boolean | $sort | Whether to sort or not. |
the users, sorted or not
_authenticate(string $userId, array $credentials)
Find out if a set of login credentials are valid.
On failure, Horde_Auth_Exception should pass a message string (if any) in the message field, and the HordeAuth::REASON* constant in the code field (defaults to Horde_Auth::REASON_MESSAGE).
| string | $userId | The userId to check. |
| array | $credentials | The credentials to use. |
_comparePasswords(string $encrypted, string $plaintext) : boolean
Compare an encrypted password to a plaintext string to see if they match.
| string | $encrypted | The crypted password to compare against. |
| string | $plaintext | The plaintext password to verify. |
True if matched, false otherwise.