Page MenuHomePhabricator

sendConfirmAndMigrateEmail.php: add an option to include emailconfirmed accounts
Closed, ResolvedPublic

Description

sendConfirmAndMigrateMail has two purposes with its [[Special:MergeAccount]] link: confirming the email and merging unattached accounts; however, if a account has a confirmed email, it's skipped:

		if ( $user->isEmailConfirmed() ) {
			$this->output( "ERROR: The user '$username@$wgDBname' already has a confirmed email address\n" );
			return;
		}

I think it's conceivable that we or someone may want to solicit those global users too to merge the unattached accounts belonging to them.

In Wikimedia projects' case, if I understand the data correctly, they are the global users corresponding to a subset of those 114,604 non-attached accounts "who clash with a global account" as of 2013-05-06.
https://www.mediawiki.org/wiki/Admin_tools_development/SUL_Audit#Metrics
According to [[mw:Admin tools development/SUL Audit/Metrics 20130417]] about 80 % of the unattached accounts have an email set; no idea how many global accounts do nor how many of those are already emailconfirmed, but it's probably a good proportion.


Version: master
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=71241

Details

Reference
bz54760

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 2:25 AM
bzimport set Reference to bz54760.
Nemo_bis created this task.Sep 29 2013, 9:39 AM

Adding an option to the maintenance script is trivial (I already did it locally).

But I think we'll also need to have a different message (centralauth-finishglobaliseemail_body specifically mentions confirming your email), and the current script sets the user_email_token_expires column (among other things), which could confuse some parts of MW if the user already has a confirmed email.

(In reply to Kunal Mehta (Legoktm) from comment #1)

Adding an option to the maintenance script is trivial (I already did it
locally).
But I think we'll also need to have a different message
(centralauth-finishglobaliseemail_body specifically mentions confirming your
email),

Not really. https://translatewiki.net/wiki/MediaWiki:Centralauth-finishglobaliseemail_body/en says that clicking the first link will confirm...merge...allow; while the second will unconfirm the address (anything might have happened since confirmation, anyway rare occasion). The language is ok as long as we do one of those three things to the account (and we do).

and the current script sets the user_email_token_expires column
(among other things), which could confuse some parts of MW if the user
already has a confirmed email.

As long as the account is not un-confirmed by the script itself (directly or indirectly) I think there is no problem. I find only two places (in User.php) where user_email_token_expires is checked , hopefully it's easy enough to assess byproducts.

Change 153760 had a related patch set uploaded by Legoktm:
Add option to include emailconfirmed accounts

https://gerrit.wikimedia.org/r/153760

If I have understood this correctly, this script will notify users who are listed in [[mw:Admin tools development/SUL Audit#Metrics]] as "Global accounts who clash with 1 or more local accounts", provided that the account has an e-mail address set. Shouldn't users who do not have an e-mail set also be notified somehow, as some of these may wish to claim unattached accounts? This would have to be in the form of a talkpage notification which will go unnoticed if the user doesn't log in or look at the talkpage, but some users might see the notification.

(In reply to Stefan2 from comment #4)

Shouldn't users who do not have an e-mail set
also be notified somehow, as some of these may wish to claim unattached
accounts?

Yes. This is being worked on too. Obviously this is outside the scope of this bug, so that's why it's not been mentioned here.

Change 153760 merged by jenkins-bot:
Add option to send confirm and migrate email to already-confirmed accounts

https://gerrit.wikimedia.org/r/153760