jenkins-bot has submitted this change and it was merged.

Change subject: createLocalAccount.php: Normalize the name before validating
......................................................................


createLocalAccount.php: Normalize the name before validating

Bug: T78058
Change-Id: I2a14c187e806bd65ef3d3455153bd93f22bb9fc5
---
M maintenance/createLocalAccount.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/maintenance/createLocalAccount.php 
b/maintenance/createLocalAccount.php
index fc9a3f0..d4f9604 100644
--- a/maintenance/createLocalAccount.php
+++ b/maintenance/createLocalAccount.php
@@ -19,11 +19,11 @@
                }
 
                $username = $this->getArg( 0 );
-               if ( !User::isValidUserName( $username ) ) {
-                       $this->error( "'$username' is an invalid username\n", 1 
);
-               }
 
                $user = User::newFromName( $username );
+               if ( $user === false ) {
+                       $this->error( "'$username' is an invalid username\n", 1 
);
+               }
                // Normalize username
                $username = $user->getName();
                if ( $user->getId() ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/178752
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a14c187e806bd65ef3d3455153bd93f22bb9fc5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to