Watch user page and user talk page by default
authorBartosz Dziewoński <matma.rex@gmail.com>
Sat, 16 Nov 2013 00:17:00 +0000 (01:17 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sat, 16 Nov 2013 00:17:00 +0000 (01:17 +0100)
When creating a new account, add the newly-created user's userpage and
talk page to their watchlist.

Bug: 49719
Change-Id: I9359682c890cb9249870a0a78a80a0076ba47f34

includes/specials/SpecialUserlogin.php

index 75b4a92..008ad5d 100644 (file)
@@ -507,9 +507,12 @@ class LoginForm extends SpecialPage {
                $u->setOption( 'rememberpassword', $this->mRemember ? 1 : 0 );
                $u->saveSettings();
 
-               # Update user count
+               // Update user count
                DeferredUpdates::addUpdate( new SiteStatsUpdate( 0, 0, 0, 0, 1 ) );
 
+               // Watch user's userpage and talk page
+               $u->addWatch( $u->getUserPage(), WatchedItem::IGNORE_USER_RIGHTS );
+
                return Status::newGood( $u );
        }