Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/107043
Change subject: Add an &wpWatchlist option ...................................................................... Add an &wpWatchlist option Add an &wpWatchlist=1 option to the URL parameters for Special:Userlogin that will allow a user to add the created account's user/talk pages to their watchlist when creating an account for another user upon creation. This option has no visual interface clutter, so it will have to be properly documented if merged. Change-Id: Ib2f23116271158e36666457d4a0e7b8e93563592 --- M includes/specials/SpecialUserlogin.php 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/43/107043/1 diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 8e5ef58..d0ba99a 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -44,7 +44,7 @@ const WRONG_TOKEN = 13; var $mUsername, $mPassword, $mRetype, $mReturnTo, $mCookieCheck, $mPosted; - var $mAction, $mCreateaccount, $mCreateaccountMail; + var $mAction, $mCreateaccount, $mCreateaccountMail, $mWatchlist; var $mLoginattempt, $mRemember, $mEmail, $mDomain, $mLanguage; var $mSkipCookieCheck, $mReturnToQuery, $mToken, $mStickHTTPS; var $mType, $mReason, $mRealName; @@ -101,6 +101,7 @@ $this->mPosted = $request->wasPosted(); $this->mCreateaccountMail = $request->getCheck( 'wpCreateaccountMail' ) && $wgEnableEmail; + $this->mWatchlist = $request->getCheck( 'wpWatchlist' ); $this->mCreateaccount = $request->getCheck( 'wpCreateaccount' ) && !$this->mCreateaccountMail; $this->mLoginattempt = $request->getCheck( 'wpLoginattempt' ); $this->mAction = $request->getVal( 'action' ); @@ -512,6 +513,9 @@ // Watch user's userpage and talk page $u->addWatch( $u->getUserPage(), WatchedItem::IGNORE_USER_RIGHTS ); + if($this->mWatchlist){ + $this->getUser()->addWatch( $u->getUserPage(), WatchedItem::IGNORE_USER_RIGHTS ); + } return Status::newGood( $u ); } -- To view, visit https://gerrit.wikimedia.org/r/107043 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2f23116271158e36666457d4a0e7b8e93563592 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Yuvipanda <yuvipa...@gmail.com> Gerrit-Reviewer: Technical 13 <technical...@yahoo.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits