From: Tom Gilder Date: Thu, 6 Oct 2005 23:16:28 +0000 (+0000) Subject: Patch for 3592: unnecessary instantiation of User X-Git-Tag: 1.6.0~1521 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=c5b8bab5b495e24df42f55cdecb07c0395b4f9fa;p=lhc%2Fweb%2Fwiklou.git Patch for 3592: unnecessary instantiation of User --- diff --git a/includes/User.php b/includes/User.php index dada941ad5..2aea2e9e96 100644 --- a/includes/User.php +++ b/includes/User.php @@ -50,8 +50,6 @@ class User { * @static */ function newFromName( $name ) { - $u = new User(); - # Force usernames to capital global $wgContLang; $name = $wgContLang->ucfirst( $name ); @@ -71,6 +69,7 @@ class User { return null; } + $u = new User(); $u->setName( $canonicalName ); $u->setId( $u->idFromName( $canonicalName ) ); return $u;