r56963 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56962‎ | r56963 | r56964 >
Date:23:47, 26 September 2009
Author:siebrand
Status:resolved
Tags:
Comment:
Revert r56696. Even though mentioned in r56937 ("Revert broken rewrite of login system"), this revision appears to have been missed.
* leaving the code style changes in User.php in.
Modified paths:
  • /trunk/extensions/OpenID/SpecialOpenIDLogin.body.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -3492,16 +3492,15 @@
34933493
34943494 /**
34953495 * Add a newuser log entry for this user
3496 - * @param $creator User who
34973496 * @param $byEmail Boolean: account made by email?
34983497 */
3499 - public function addNewUserLogEntry( $creator, $byEmail = false ) {
 3498+ public function addNewUserLogEntry( $byEmail = false ) {
35003499 global $wgUser, $wgContLang, $wgNewUserLog;
35013500 if( empty($wgNewUserLog) ) {
35023501 return true; // disabled
35033502 }
35043503 $talk = $wgContLang->getFormattedNsText( NS_TALK );
3505 - if( $creator != $wgUser ) {
 3504+ if( $this->getName() == $wgUser->getName() ) {
35063505 $action = 'create';
35073506 $message = '';
35083507 } else {
Index: trunk/extensions/OpenID/SpecialOpenIDLogin.body.php
@@ -493,7 +493,6 @@
494494 $wgOut->returnToMain( false, $this->returnTo() );
495495 }
496496
497 - # FIXME: this should probably use a Login method
498497 function createUser( $openid, $sreg, $name ) {
499498 global $wgAuth;
500499
@@ -505,7 +504,7 @@
506505 }
507506
508507 $user->addToDatabase();
509 - $user->addNewUserLogEntry( $user );
 508+ $user->addNewUserLogEntry();
510509
511510 if ( !$user->getId() ) {
512511 wfDebug( "OpenID: Error adding new user.\n" );

Follow-up revisions

RevisionCommit summaryAuthorDate
r56964Fix oversight in r56963: remove $creatorsiebrand23:51, 26 September 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r56696Follow-up to r56684; fix newuser log.happy-melon10:57, 21 September 2009
r56937Revert broken rewrite of login system; totally broken....brion00:49, 26 September 2009

Status & tagging log