Skip to content

Commit

Permalink
Don't link temporary account and named account in newusers log
Browse files Browse the repository at this point in the history
Why:
* When a temporary account creates a named account, the 'newusers'
  log currently links the temporary account username and the new
  named account.
* This is an issue because temporary accounts are intended to be
  anonymous and there is no path for a temporary account to
  link their contributions to their new account. As such, there
  should be no link between them.

What:
* Update AuthManager::continueAccountCreation to only mark the
  performer of the 'newusers' log entry as the creator account
  if the creator is named.

Bug: T364716
Change-Id: Ib95374949c5c72c9f7ee665943c16d177f2e31c0
  • Loading branch information
Dreamy-Jazz committed Jun 20, 2024
1 parent 0fb7fe4 commit d64c0ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/auth/AuthManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1665,12 +1665,12 @@ public function continueAccountCreation( array $reqs ) {

// Log the creation
if ( $this->config->get( MainConfigNames::NewUserLog ) ) {
$isAnon = $creator->isAnon();
$isNamed = $creator->isNamed();
$logEntry = new \ManualLogEntry(
'newusers',
$logSubtype ?: ( $isAnon ? 'create' : 'create2' )
$logSubtype ?: ( $isNamed ? 'create2' : 'create' )
);
$logEntry->setPerformer( $isAnon ? $user : $creator );
$logEntry->setPerformer( $isNamed ? $creator : $user );
$logEntry->setTarget( $user->getUserPage() );
/** @var CreationReasonAuthenticationRequest $req */
$req = AuthenticationRequest::getRequestByClass(
Expand Down

0 comments on commit d64c0ef

Please sign in to comment.