48 public function run() {
49 $oldName = $this->params[
'oldname'];
50 $newName = $this->params[
'newname'];
51 $uid = $this->params[
'uid'];
52 $performerUid = $this->params[
'performer'];
53 $reason = $this->params[
'reason'];
54 $movePages = $this->params[
'movePages'] ??
true;
55 $suppressRedirect = $this->params[
'suppressRedirect'] ??
false;
57 $user = $this->userFactory->newFromId( $uid );
58 $performer = $this->userFactory->newFromId( $performerUid );
59 $logger = LoggerFactory::getInstance(
'RenameUser' );
62 if ( !$this->userFactory->isUserTableShared() ) {
65 if ( $user->getName() !== $newName ) {
67 "User to be renamed from $oldName to $newName does not have the expected name, skipping"
73 $rename = $this->renameUserFactory->newDerivedRenameUser(
80 'movePages' => $movePages,
81 'suppressRedirect' => $suppressRedirect
84 $status = $rename->renameLocal();
85 if ( !$status->isGood() ) {
87 "Cannot finish derived local user rename from $oldName to $newName: $status"
91 return $status->isOK();