Page MenuHomePhabricator

Autocreate should add the local userpage to the local watchlist
Closed, ResolvedPublic

Description

T51719 added automatic watchlisting of a new account's userpage.

However, it doesn't extend to other wikis on the same wikifarm.

I.e.
If I create a new account at Enwiki. The userpage there is automatically watchlisted.
I then visit Frwiki. The userpage there is Not watchlisted.

Details

Reference
bz69589

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:32 AM
bzimport set Reference to bz69589.
bzimport added a subscriber: Unknown Object (MLST).

We should really fix this in core, and not in every AuthPlugin extension. But that would requiring fixing the account creation logic and ugh.

Fair enough. It seems like perhaps it can just be moved from SpecialUserlogin->initUser to User->addToDatabase.

The latter is called by CentralAuth.

Change 195297 had a related patch set uploaded (by Legoktm):
WIP: AuthManager skeleton

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

Change 289094 had a related patch set uploaded (by Gergő Tisza):
Add AuthManager

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

Is this fixed by AuthManager, or just potentially easier to fix?

I believe that this is the case (i.e. has been implemented since the task was filed) - I tested by going to ar.wikiquote.org and fr.wikinews.org and both had my user page watchlisted despite my having never visited the site before. Can this be closed?

Indeed, this code in AuthManager.php looks like it handles this:

class AuthManager implements LoggerAwareInterface {
	
	public function autoCreateUser( User $user, $source, $login = true ) {
		
		// Watch user's userpage and talk page
		\DeferredUpdates::addCallableUpdate( function () use ( $user ) {
			$user->addWatch( $user->getUserPage(), User::IGNORE_USER_RIGHTS );
		} );