MediaWiki master
|
Class which performs the actual renaming of users. More...
Public Member Functions | |
__construct ( $old, $new, $uid, User $renamer, $options=[]) | |
Constructor. | |
rename () | |
Do the rename operation. | |
Public Attributes | |
bool | $checkIfUserExists |
Flag that can be set to false, in case another process has already started the updates and the old username may have already been renamed in the user table. | |
string | $new |
The new username of the user being renamed. | |
string | $old |
The old username of the user being renamed. | |
array | $tables |
The [ tables => fields ] to be updated. | |
array[] | $tablesJob |
[ tables => fields ] to be updated in a deferred job | |
int | $uid |
The user ID of the user being renamed. | |
const | NAME_COL = 0 |
const | TIME_COL = 2 |
const | UID_COL = 1 |
Protected Member Functions | |
debug ( $msg) | |
Class which performs the actual renaming of users.
Definition at line 25 of file RenameuserSQL.php.
MediaWiki\RenameUser\RenameuserSQL::__construct | ( | $old, | |
$new, | |||
$uid, | |||
User | $renamer, | ||
$options = [] ) |
Constructor.
string | $old | The old username |
string | $new | The new username |
int | $uid | |
User | $renamer | |
array | $options | Optional extra options. 'reason' - string, reason for the rename 'debugPrefix' - string, prefixed to debug messages 'checkIfUserExists' - bool, whether to update the user table |
Definition at line 128 of file RenameuserSQL.php.
References MediaWiki\RenameUser\RenameuserSQL\$new, MediaWiki\RenameUser\RenameuserSQL\$old, MediaWiki\RenameUser\RenameuserSQL\$uid, MediaWiki\MediaWikiServices\getInstance(), and MediaWiki\MainConfigNames\UpdateRowsPerJob.
|
protected |
Definition at line 164 of file RenameuserSQL.php.
Referenced by MediaWiki\RenameUser\RenameuserSQL\rename().
MediaWiki\RenameUser\RenameuserSQL::rename | ( | ) |
Do the rename operation.
Definition at line 175 of file RenameuserSQL.php.
References MediaWiki\RenameUser\RenameuserSQL\$new, MediaWiki\RenameUser\RenameuserSQL\$old, $params, MediaWiki\RenameUser\RenameuserSQL\$uid, MediaWiki\RenameUser\RenameuserSQL\debug(), MediaWiki\Specials\SpecialLog\getLogTypesOnUser(), MediaWiki\RenameUser\RenameuserSQL\NAME_COL, NS_USER, RC_LOG, MediaWiki\RenameUser\RenameuserSQL\TIME_COL, and MediaWiki\RenameUser\RenameuserSQL\UID_COL.
bool MediaWiki\RenameUser\RenameuserSQL::$checkIfUserExists |
Flag that can be set to false, in case another process has already started the updates and the old username may have already been renamed in the user table.
Definition at line 67 of file RenameuserSQL.php.
string MediaWiki\RenameUser\RenameuserSQL::$new |
The new username of the user being renamed.
Definition at line 38 of file RenameuserSQL.php.
Referenced by MediaWiki\RenameUser\RenameuserSQL\__construct(), and MediaWiki\RenameUser\RenameuserSQL\rename().
string MediaWiki\RenameUser\RenameuserSQL::$old |
The old username of the user being renamed.
Definition at line 31 of file RenameuserSQL.php.
Referenced by MediaWiki\RenameUser\RenameuserSQL\__construct(), and MediaWiki\RenameUser\RenameuserSQL\rename().
array MediaWiki\RenameUser\RenameuserSQL::$tables |
The [ tables => fields ] to be updated.
Definition at line 52 of file RenameuserSQL.php.
array [] MediaWiki\RenameUser\RenameuserSQL::$tablesJob |
[ tables => fields ] to be updated in a deferred job
Definition at line 59 of file RenameuserSQL.php.
int MediaWiki\RenameUser\RenameuserSQL::$uid |
The user ID of the user being renamed.
Definition at line 45 of file RenameuserSQL.php.
Referenced by MediaWiki\RenameUser\RenameuserSQL\__construct(), and MediaWiki\RenameUser\RenameuserSQL\rename().
const MediaWiki\RenameUser\RenameuserSQL::NAME_COL = 0 |
Definition at line 91 of file RenameuserSQL.php.
Referenced by MediaWiki\RenameUser\RenameuserSQL\rename().
const MediaWiki\RenameUser\RenameuserSQL::TIME_COL = 2 |
Definition at line 93 of file RenameuserSQL.php.
Referenced by MediaWiki\RenameUser\RenameuserSQL\rename().
const MediaWiki\RenameUser\RenameuserSQL::UID_COL = 1 |
Definition at line 92 of file RenameuserSQL.php.
Referenced by MediaWiki\RenameUser\RenameuserSQL\rename().