From 3110338e184c96d4b0aecc4c7b56256318c0ca10 Mon Sep 17 00:00:00 2001 From: S Page Date: Thu, 7 Feb 2013 18:55:54 -0800 Subject: [PATCH] (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 --- RELEASE-NOTES-1.21 | 1 + includes/specials/SpecialUserlogin.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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 { -- 2.20.1