From: S Page Date: Fri, 8 Feb 2013 02:55:54 +0000 (-0800) Subject: (bug 44775) Don't pre-fill username when creating. X-Git-Tag: 1.31.0-rc.0~20705^2 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=3110338e184c96d4b0aecc4c7b56256318c0ca10;p=lhc%2Fweb%2Fwiklou.git (bug 44775) Don't pre-fill username when creating. In "Create account" (signup) mode, never auto-populate the username. Pre-filling with the name of the user who last logged in is wrong (bug 44775), and if a logged-in user is creating a new account then pre-filling with her own username isn't helpful. Change-Id: I1bb641b2186a8c8dc92be0c7b5de2e9069dd31ed --- diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index 6ffe112e7c..aa3f48aa5a 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -165,6 +165,7 @@ production. ca-edit click instead opening URL directly. * (bug 43964) Invalid value of "link" parameter in no longer produces a fatal error. +* (bug 44775) The username field is not pre-filled when creating an account. === API changes in 1.21 === * prop=revisions can now report the contentmodel and contentformat. diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 63d101b8ee..f0758fb65f 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -1031,7 +1031,8 @@ class LoginForm extends SpecialPage { } } - if ( $this->mUsername == '' ) { + // Pre-fill username (if not creating an account, bug 44775). + if ( $this->mUsername == '' && $this->mType != 'signup' ) { if ( $user->isLoggedIn() ) { $this->mUsername = $user->getName(); } else {