|
MediaWiki master
|
Handles the backend logic of renaming users. More...
Public Member Functions | |
| __construct (private readonly ServiceOptions $options, private readonly CentralIdLookupFactory $centralIdLookupFactory, private readonly IConnectionProvider $dbProvider, private readonly JobQueueGroupFactory $jobQueueGroupFactory, private readonly MovePageFactory $movePageFactory, private readonly UserFactory $userFactory, private readonly UserNameUtils $userNameUtils, private readonly PermissionManager $permissionManager, private readonly TitleFactory $titleFactory, User $performer, User $target, string $oldName, string $newName, string $reason, array $renameOptions) | |
| Valid options for $renameOptions: | |
| moveUserPages () | |
| Attempts to move local user pages. | |
| rename () | |
| Attempts to perform the rename smartly after checking the performer's rights. | |
| renameGlobal () | |
| Attempts to perform the rename globally. | |
| renameLocal () | |
| Performs the rename in local domain. | |
| renameUnsafe () | |
| Attempts to perform the rename smartly. | |
Public Attributes | |
| const | CONSTRUCTOR_OPTIONS |
Handles the backend logic of renaming users.
Definition at line 30 of file RenameUser.php.
| MediaWiki\RenameUser\RenameUser::__construct | ( | private readonly ServiceOptions | $options, |
| private readonly CentralIdLookupFactory | $centralIdLookupFactory, | ||
| private readonly IConnectionProvider | $dbProvider, | ||
| private readonly JobQueueGroupFactory | $jobQueueGroupFactory, | ||
| private readonly MovePageFactory | $movePageFactory, | ||
| private readonly UserFactory | $userFactory, | ||
| private readonly UserNameUtils | $userNameUtils, | ||
| private readonly PermissionManager | $permissionManager, | ||
| private readonly TitleFactory | $titleFactory, | ||
| User | $performer, | ||
| User | $target, | ||
| string | $oldName, | ||
| string | $newName, | ||
| string | $reason, | ||
| array | $renameOptions ) |
Valid options for $renameOptions:
Definition at line 69 of file RenameUser.php.
| MediaWiki\RenameUser\RenameUser::moveUserPages | ( | ) |
Attempts to move local user pages.
Definition at line 214 of file RenameUser.php.
References NS_USER.
| MediaWiki\RenameUser\RenameUser::rename | ( | ) |
Attempts to perform the rename smartly after checking the performer's rights.
This decides whether renameGlobal or renameLocal should be used and call the proper function.
Definition at line 355 of file RenameUser.php.
| MediaWiki\RenameUser\RenameUser::renameGlobal | ( | ) |
Attempts to perform the rename globally.
This will first call renameLocal to complete local renaming, then enqueue RenameUserDerivedJob for all other wikis in the same wiki family.
Definition at line 283 of file RenameUser.php.
| MediaWiki\RenameUser\RenameUser::renameLocal | ( | ) |
| MediaWiki\RenameUser\RenameUser::renameUnsafe | ( | ) |
Attempts to perform the rename smartly.
This decides whether renameGlobal or renameLocal should be used and call the proper function.
Definition at line 339 of file RenameUser.php.
| const MediaWiki\RenameUser\RenameUser::CONSTRUCTOR_OPTIONS |
Definition at line 57 of file RenameUser.php.