Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/203862
Change subject: LocalRenameJob: Don't bother creating an account if username is
reserved
......................................................................
LocalRenameJob: Don't bother creating an account if username is reserved
Change-Id: I527e62df806c53ccf4c0307902a8e751245e7de2
---
M includes/LocalRenameJob/LocalRenameJob.php
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth
refs/changes/62/203862/1
diff --git a/includes/LocalRenameJob/LocalRenameJob.php
b/includes/LocalRenameJob/LocalRenameJob.php
index 099e8a5..565c3cc 100644
--- a/includes/LocalRenameJob/LocalRenameJob.php
+++ b/includes/LocalRenameJob/LocalRenameJob.php
@@ -41,6 +41,11 @@
*/
protected function getRenameUser() {
$user = User::newFromName( $this->params['renamer'] );
+ // If the username is a reserved name, don't worry about the
account
+ // existing, just use it.
+ if ( !User::isUsableName( $user->getName() ) ) {
+ return $user;
+ }
$caUser = CentralAuthUser::getInstance( $user );
// Race condition where the renamer isn't attached here, but
// someone creates an account in the meantime and then bad
--
To view, visit https://gerrit.wikimedia.org/r/203862
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I527e62df806c53ccf4c0307902a8e751245e7de2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits