(bug 44775) Don't pre-fill username when creating.
authorS Page <spage@wikimedia.org>
Fri, 8 Feb 2013 02:55:54 +0000 (18:55 -0800)
committerS Page <spage@wikimedia.org>
Tue, 12 Feb 2013 03:42:13 +0000 (19:42 -0800)
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

RELEASE-NOTES-1.21
includes/specials/SpecialUserlogin.php

index 6ffe112..aa3f48a 100644 (file)
@@ -165,6 +165,7 @@ production.
   ca-edit click instead opening URL directly.
 * (bug 43964) Invalid value of "link" parameter in <gallery> 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.
index 63d101b..f0758fb 100644 (file)
@@ -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 {