|
MediaWiki master
|
BotPassword interaction with databases. More...
Public Member Functions | |
| __construct (private readonly ServiceOptions $options, private readonly CentralIdLookup $centralIdLookup, private readonly IConnectionProvider $dbProvider,) | |
| deleteBotPassword (BotPassword $botPassword) | |
| Delete an existing BotPassword in the database. | |
| getByCentralId (int $centralId, string $appId, int $flags=IDBAccessObject::READ_NORMAL) | |
| Load a BotPassword from the database. | |
| getByUser (UserIdentity $userIdentity, string $appId, int $flags=IDBAccessObject::READ_NORMAL) | |
| Load a BotPassword from the database based on a UserIdentity object. | |
| getPrimaryDatabase () | |
| Get a database connection for the bot passwords database. | |
| getReplicaDatabase () | |
| Get a database connection for the bot passwords database. | |
| insertBotPassword (BotPassword $botPassword, ?Password $password=null) | |
| Save the new BotPassword to the database. | |
| invalidateUserPasswords (string $username) | |
| Invalidate all passwords for a user, by name. | |
| newUnsavedBotPassword (array $data, int $flags=IDBAccessObject::READ_NORMAL) | |
| Create an unsaved BotPassword. | |
| removeUserPasswords (string $username) | |
| Remove all passwords for a user, by name. | |
| updateBotPassword (BotPassword $botPassword, ?Password $password=null) | |
| Update an existing BotPassword in the database. | |
Public Attributes | |
| const | CONSTRUCTOR_OPTIONS |
BotPassword interaction with databases.
Definition at line 29 of file BotPasswordStore.php.
| MediaWiki\User\BotPasswordStore::__construct | ( | private readonly ServiceOptions | $options, |
| private readonly CentralIdLookup | $centralIdLookup, | ||
| private readonly IConnectionProvider | $dbProvider ) |
Definition at line 38 of file BotPasswordStore.php.
| MediaWiki\User\BotPasswordStore::deleteBotPassword | ( | BotPassword | $botPassword | ) |
Delete an existing BotPassword in the database.
Definition at line 298 of file BotPasswordStore.php.
| MediaWiki\User\BotPasswordStore::getByCentralId | ( | int | $centralId, |
| string | $appId, | ||
| int | $flags = IDBAccessObject::READ_NORMAL ) |
Load a BotPassword from the database.
| int | $centralId | from CentralIdLookup |
| string | $appId | |
| int | $flags | IDBAccessObject read flags |
Definition at line 93 of file BotPasswordStore.php.
| MediaWiki\User\BotPasswordStore::getByUser | ( | UserIdentity | $userIdentity, |
| string | $appId, | ||
| int | $flags = IDBAccessObject::READ_NORMAL ) |
Load a BotPassword from the database based on a UserIdentity object.
| UserIdentity | $userIdentity | |
| string | $appId | |
| int | $flags | IDBAccessObject read flags |
Definition at line 69 of file BotPasswordStore.php.
| MediaWiki\User\BotPasswordStore::getPrimaryDatabase | ( | ) |
Get a database connection for the bot passwords database.
Definition at line 58 of file BotPasswordStore.php.
| MediaWiki\User\BotPasswordStore::getReplicaDatabase | ( | ) |
Get a database connection for the bot passwords database.
Definition at line 50 of file BotPasswordStore.php.
| MediaWiki\User\BotPasswordStore::insertBotPassword | ( | BotPassword | $botPassword, |
| ?Password | $password = null ) |
Save the new BotPassword to the database.
| BotPassword | $botPassword | |
| Password | null | $password | Use null for an invalid password |
Definition at line 188 of file BotPasswordStore.php.
| MediaWiki\User\BotPasswordStore::invalidateUserPasswords | ( | string | $username | ) |
Invalidate all passwords for a user, by name.
| string | $username |
Definition at line 314 of file BotPasswordStore.php.
| MediaWiki\User\BotPasswordStore::newUnsavedBotPassword | ( | array | $data, |
| int | $flags = IDBAccessObject::READ_NORMAL ) |
Create an unsaved BotPassword.
| array | $data | Data to use to create the bot password. Keys are:
|
| int | $flags | IDBAccessObject read flags |
Definition at line 128 of file BotPasswordStore.php.
| MediaWiki\User\BotPasswordStore::removeUserPasswords | ( | string | $username | ) |
Remove all passwords for a user, by name.
| string | $username |
Definition at line 342 of file BotPasswordStore.php.
| MediaWiki\User\BotPasswordStore::updateBotPassword | ( | BotPassword | $botPassword, |
| ?Password | $password = null ) |
Update an existing BotPassword in the database.
| BotPassword | $botPassword | |
| Password | null | $password | Use null for an invalid password |
Definition at line 234 of file BotPasswordStore.php.
| const MediaWiki\User\BotPasswordStore::CONSTRUCTOR_OPTIONS |
Definition at line 34 of file BotPasswordStore.php.