Index: trunk/extensions/OpenID/SpecialOpenIDLogin.body.php |
— | — | @@ -393,8 +393,6 @@ |
394 | 394 | return; |
395 | 395 | } |
396 | 396 | |
397 | | - $wgUser = $user; |
398 | | - |
399 | 397 | $this->clearValues(); |
400 | 398 | |
401 | 399 | $this->displaySuccessLogin( $openid ); |
— | — | @@ -462,7 +460,7 @@ |
463 | 461 | if ($wgOpenIDUseEmailAsNickname) { |
464 | 462 | $name = $this->getNameFromEmail( $openid, $sreg, $ax ); |
465 | 463 | if ( !empty($name) && $this->userNameOk( $name ) ) { |
466 | | - $wgUser = $this->createUser( $openid, $sreg, $ax, $name ); |
| 464 | + $user = $this->createUser( $openid, $sreg, $ax, $name ); |
467 | 465 | $this->displaySuccessLogin( $openid ); |
468 | 466 | return; |
469 | 467 | } |
— | — | @@ -588,7 +586,7 @@ |
589 | 587 | } |
590 | 588 | |
591 | 589 | function createUser( $openid, $sreg, $ax, $name ) { |
592 | | - global $wgAuth; |
| 590 | + global $wgUser, $wgAuth; |
593 | 591 | |
594 | 592 | $user = User::newFromName( $name ); |
595 | 593 | |
— | — | @@ -598,7 +596,6 @@ |
599 | 597 | } |
600 | 598 | |
601 | 599 | $user->addToDatabase(); |
602 | | - $user->addNewUserLogEntry(); |
603 | 600 | |
604 | 601 | if ( !$user->getId() ) { |
605 | 602 | wfDebug( "OpenID: Error adding new user.\n" ); |
— | — | @@ -606,6 +603,9 @@ |
607 | 604 | $wgAuth->initUser( $user ); |
608 | 605 | $wgAuth->updateUser( $user ); |
609 | 606 | |
| 607 | + $wgUser = $user; |
| 608 | + $user->addNewUserLogEntry(); |
| 609 | + |
610 | 610 | # Update site stats |
611 | 611 | $ssUpdate = new SiteStatsUpdate( 0, 0, 0, 0, 1 ); |
612 | 612 | $ssUpdate->doUpdate(); |