|
| __construct (ServiceOptions $options, CentralIdLookup $centralIdLookup, LBFactory $lbFactory) |
|
| deleteBotPassword (BotPassword $botPassword) |
| Delete an existing BotPassword in the database.
|
|
| getByCentralId (int $centralId, string $appId, int $flags=self::READ_NORMAL) |
| Load a BotPassword from the database.
|
|
| getByUser (UserIdentity $userIdentity, string $appId, int $flags=self::READ_NORMAL) |
| Load a BotPassword from the database based on a UserIdentity object.
|
|
| getDatabase (int $db) |
| 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=self::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.
|
|
|
| validateBotPassword (BotPassword $botPassword) |
| Check if a BotPassword is valid to save in the database (either inserting a new one or updating an existing one) based on the size of the restrictions and grants.
|
|
- Author
- DannyS712
- Since
- 1.37
Definition at line 44 of file BotPasswordStore.php.
◆ __construct()
◆ deleteBotPassword()
MediaWiki\User\BotPasswordStore::deleteBotPassword |
( |
BotPassword |
$botPassword | ) |
|
◆ getByCentralId()
MediaWiki\User\BotPasswordStore::getByCentralId |
( |
int |
$centralId, |
|
|
string |
$appId, |
|
|
int |
$flags = self::READ_NORMAL |
|
) |
| |
◆ getByUser()
MediaWiki\User\BotPasswordStore::getByUser |
( |
UserIdentity |
$userIdentity, |
|
|
string |
$appId, |
|
|
int |
$flags = self::READ_NORMAL |
|
) |
| |
◆ getDatabase()
MediaWiki\User\BotPasswordStore::getDatabase |
( |
int |
$db | ) |
|
Get a database connection for the bot passwords database.
- Parameters
-
int | $db | Index of the connection to get, e.g. DB_PRIMARY or DB_REPLICA. |
- Returns
- IDatabase
- Access: internal
Definition at line 86 of file BotPasswordStore.php.
◆ insertBotPassword()
MediaWiki\User\BotPasswordStore::insertBotPassword |
( |
BotPassword |
$botPassword, |
|
|
Password |
$password = null |
|
) |
| |
◆ invalidateUserPasswords()
MediaWiki\User\BotPasswordStore::invalidateUserPasswords |
( |
string |
$username | ) |
|
Invalidate all passwords for a user, by name.
- Parameters
-
- Returns
- bool Whether any passwords were invalidated
Definition at line 372 of file BotPasswordStore.php.
◆ newUnsavedBotPassword()
MediaWiki\User\BotPasswordStore::newUnsavedBotPassword |
( |
array |
$data, |
|
|
int |
$flags = self::READ_NORMAL |
|
) |
| |
Create an unsaved BotPassword.
- Parameters
-
array | $data | Data to use to create the bot password. Keys are:
- user: (UserIdentity) UserIdentity to create the password for. Overrides username and centralId.
- username: (string) Username to create the password for. Overrides centralId.
- centralId: (int) User central ID to create the password for.
- appId: (string, required) App ID for the password.
- restrictions: (MWRestrictions, optional) Restrictions.
- grants: (string[], optional) Grants.
|
int | $flags | IDBAccessObject read flags |
- Returns
- BotPassword|null
Definition at line 167 of file BotPasswordStore.php.
◆ removeUserPasswords()
MediaWiki\User\BotPasswordStore::removeUserPasswords |
( |
string |
$username | ) |
|
Remove all passwords for a user, by name.
- Parameters
-
- Returns
- bool Whether any passwords were removed
Definition at line 401 of file BotPasswordStore.php.
◆ updateBotPassword()
MediaWiki\User\BotPasswordStore::updateBotPassword |
( |
BotPassword |
$botPassword, |
|
|
Password |
$password = null |
|
) |
| |
◆ validateBotPassword()
MediaWiki\User\BotPasswordStore::validateBotPassword |
( |
BotPassword |
$botPassword | ) |
|
|
private |
Check if a BotPassword is valid to save in the database (either inserting a new one or updating an existing one) based on the size of the restrictions and grants.
- Parameters
-
- Returns
- StatusValue
Definition at line 331 of file BotPasswordStore.php.
References $res.
◆ $centralIdLookup
◆ $lbFactory
LBFactory MediaWiki\User\BotPasswordStore::$lbFactory |
|
private |
◆ $options
◆ CONSTRUCTOR_OPTIONS
const MediaWiki\User\BotPasswordStore::CONSTRUCTOR_OPTIONS |
Initial value:= [
'EnableBotPasswords',
'BotPasswordsCluster',
'BotPasswordsDatabase',
]
- Access: internal
- For use by ServiceWiring
Definition at line 49 of file BotPasswordStore.php.
The documentation for this class was generated from the following file: