PHP Класс Horde_Auth_Customsql, horde

Автор: Ronnie Garcia ([email protected])
Автор: Chuck Hagenbuch ([email protected])
Автор: Joel Vandal ([email protected])
Наследование: extends Horde_Auth_Sql
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_capabilities array An array of capabilities, so that the driver can report which operations it supports and which it doesn't.

Открытые методы

Метод Описание
__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 Lists all users in the system.
removeUser ( string $userId ) Delete a set of authentication credentials.
resetPassword ( string $userId ) : string Resets 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.

Защищенные методы

Метод Описание
_authenticate ( string $userId, array $credentials ) Find out if a set of login credentials are valid.
_getPassword ( string $userId ) : string Fetch $userId's current password - needed for the salt with some encryption schemes when doing authentication or updates.

Описание методов

__construct() публичный Метод

Some special tokens can be used in the SQL query. They are replaced at the query stage: '\L' will be replaced by the user's login '\P' will be replaced by the user's password. '\O' will be replaced by the old user's login (required for update) Eg: "SELECT * FROM users WHERE uid = \L AND passwd = \P AND billing = 'paid'"
public __construct ( array $params = [] )
$params array Configuration parameters: - query_auth: (string) Authenticate the user. ('\L' & '\P') - query_add: (string) Add user. ('\L' & '\P') - query_getpw: (string) Get one user's password. ('\L') - query_update: (string) Update user. ('\O', '\L' & '\P') - query_resetpassword: (string) Reset password. ('\L', & '\P') - query_remove: (string) Remove user. ('\L') - query_list: (string) List user. - query_exists: (string) Check for existance of user. ('\L')

_authenticate() защищенный Метод

Find out if a set of login credentials are valid.
protected _authenticate ( string $userId, array $credentials )
$userId string The userId to check.
$credentials array The credentials to use.

_getPassword() защищенный Метод

Fetch $userId's current password - needed for the salt with some encryption schemes when doing authentication or updates.
protected _getPassword ( string $userId ) : string
$userId string The userId to query.
Результат string $userId's current password.

addUser() публичный Метод

Add a set of authentication credentials.
public addUser ( string $userId, array $credentials )
$userId string The userId to add.
$credentials array The credentials to add.

exists() публичный Метод

Checks if a userId exists in the system.
public exists ( string $userId ) : boolean
$userId string User ID for which to check
Результат boolean Whether or not the userId already exists.

listUsers() публичный Метод

Lists all users in the system.
public listUsers ( boolean $sort = false ) : array
$sort boolean Sort the users?
Результат array The array of userIds.

removeUser() публичный Метод

Delete a set of authentication credentials.
public removeUser ( string $userId )
$userId string The userId to delete.

resetPassword() публичный Метод

Resets a user's password. Used for example when the user does not remember the existing password.
public resetPassword ( string $userId ) : string
$userId string The user id for which to reset the password.
Результат string The new password on success.

updateUser() публичный Метод

Update a set of authentication credentials.
public updateUser ( string $oldId, string $newId, array $credentials )
$oldId string The old userId.
$newId string The new userId.
$credentials array The new credentials

Описание свойств

$_capabilities защищенное свойство

An array of capabilities, so that the driver can report which operations it supports and which it doesn't.
protected array $_capabilities
Результат array