Page MenuHomePhabricator

Deprecate $wgUser
Open, Needs TriagePublic

Description

See parent task for reasoning.

Current usages:

$ ack '\$wgUser\b' --php
extensions/AbuseFilter/AbuseFilter.hooks.php
355:		global $wgUser;
360:		if ( $wgUser->isAllowed( 'abusefilter-bypass' ) ) {
365:		self::onMovePageCheckPermissions( $oldTitle, $newTitle, $wgUser, $reason, $status );
418:		global $wgUser;
419:		if ( !$autocreate && $wgUser->getId() ) {
420:			$vars->addHolders( AbuseFilter::generateUserVars( $wgUser ) );
758:		global $wgUser, $wgVersion;
770:		return self::filterUpload( 'upload', $upload, $wgUser, $props, null, null, $error );

extensions/AbuseFilter/includes/AbuseFilter.class.php
874:	 * @param User $user The user performing the action; defaults to $wgUser
881:		global $wgUser, $wgTitle, $wgRequest;
893:			$user = $wgUser;
954:			// If $wgUser isn't safe to load (e.g. a failure during
1378:				global $wgAbuseFilterBlockDuration, $wgAbuseFilterAnonBlockDuration, $wgUser;
1379:				if ( $wgUser->isAnon() && $wgAbuseFilterAnonBlockDuration !== null ) {
1392:					$wgUser->getName(),
1421:				global $wgUser;
1422:				if ( !$wgUser->isAnon() ) {
1424:					$groups = $wgUser->getGroups();
1427:						$wgUser->removeGroup( $group );
1445:						$wgUser->getUserPage(),
1461:				global $wgUser;
1462:				if ( !$wgUser->isAnon() ) {
1465:						self::autoPromoteBlockKey( $wgUser ), true, $blockPeriod
1482:				global $wgUser;
1485:					$title->getPrefixedText(), $wgUser->getName(),
1624:		global $wgUser, $wgRequest;
1631:				$identifier = $wgUser->getId();
1637:				$reg = $wgUser->getRegistration();
1642:				$identifier = $wgUser->getEditCount();
1900:		global $wgUser;
1902:		if ( !$wgUser->isAllowed( 'abusefilter-modify' ) ) {

extensions/AbuseFilter/special/SpecialAbuseLog.php
411:		global $wgUser;
418:				return $wgUser->isAllowed( 'abusefilter-log-detail' ) && (
419:					AbuseFilterView::canViewPrivate() || $wgUser->isAllowed( 'abusefilter-log-private' )
424:		return $wgUser->isAllowed( 'abusefilter-log-detail' );
431:		global $wgUser;
433:		return $wgUser->isAllowed( 'abusefilter-private' );
440:		global $wgUser;
442:		return $wgUser->isAllowed( 'abusefilter-hidden-log' );

extensions/AbuseFilter/Views/AbuseFilterView.php
67:		global $wgUser;
71:			$canView = $wgUser->isAllowedAny( 'abusefilter-modify', 'abusefilter-view-private' );

extensions/AntiSpoof/AntiSpoofHooks.php
43:		global $wgAntiSpoofAccounts, $wgUser, $wgRequest;
49:				$wgUser->isAllowed( 'override-antispoof' ) ) {
97:		global $wgRequest, $wgAntiSpoofAccounts, $wgUser;
99:		if ( $wgAntiSpoofAccounts && $wgUser->isAllowed( 'override-antispoof' ) ) {

extensions/Campaigns/Campaigns.hooks.php
54:		global $wgRequest, $wgUser;
57:		$creatorUserId = $wgUser->getId();

extensions/CentralAuth/AntiSpoof/CentralAuthAntiSpoofHooks.php
15:		global $wgAntiSpoofAccounts, $wgUser, $wgRequest;
17:		$status = self::testNewAccount( $user, $wgUser, $wgAntiSpoofAccounts, $wgRequest->getCheck( 'wpIgnoreAntiSpoof' ) );

extensions/CentralAuth/includes/api/ApiDeleteGlobalAccount.php
102:		global $wgUser;
103:		if ( !$wgUser->isAllowed( 'centralauth-unmerge' ) ) {
107:		return $wgUser->getEditToken( 'deleteglobalaccount' );

extensions/CentralAuth/includes/api/ApiQueryGlobalUserInfo.php
139:			// Code will fall back to $wgUser, don't cache

extensions/CentralAuth/includes/api/ApiSetGlobalAccountStatus.php
158:		global $wgUser;
159:		if ( !$wgUser->isAllowed( 'centralauth-lock' ) ) {
163:		return $wgUser->getEditToken( 'setglobalaccountstatus' );

extensions/CentralAuth/includes/CentralAuthHooks.php
937:		global $wgUser;
938:		if ( !$wgUser->isAnon() ) {
939:			$centralUser = CentralAuthUser::getInstance( $wgUser );

extensions/CentralAuth/includes/CentralAuthPreAuthManagerHooks.php
217:		global $wgCentralAuthCheckSULMigration, $wgUser;
219:			$wgUser->getRequest()->getSessionData( 'CentralAuthForcedRename' ) === true &&
225:			$wgUser->getRequest()->setSessionData( 'SulRenameWarning', array(

extensions/CentralAuth/includes/CentralAuthUser.php
1662:		global $wgUser;
1663:		$this->doCrosswikiSuppression( true, $wgUser->getName(), $reason );
1672:		global $wgUser;
1673:		$this->doCrosswikiSuppression( false, $wgUser->getName(), $reason );

extensions/CentralAuth/includes/specials/SpecialCentralLogin.php
185:		global $wgUser;
263:		$wgUser = $user;
316:				"CentralAuthMigration: Login completed for renamed user '{$wgUser->getName()}'"

extensions/CentralAuth/maintenance/deleteEmptyAccounts.php
27:		global $wgUser;
29:		$wgUser = User::newFromName( 'Maintenance script' );
30:		RequestContext::getMain()->setUser( $wgUser );

extensions/CentralNotice/CentralNotice.hooks.php
168:		// Using global $wgUser for compatibility with 1.18
172:			$wgUser, $wgMemc;
192:		if ( $wgUser->isLoggedIn() ) {
194:			$cacheKey = wfMemcKey( 'CentralNotice', 'UserData', $wgUser->getId() );
200:				if ( $wgUser->isAllowed( 'bot' ) ) {
206:					$registrationDate = $wgUser->getRegistration() ? $wgUser->getRegistration() : 0;

extensions/CentralNotice/includes/Banner.php
923:		global $wgUser;
929:			$user = $wgUser;
1057:		global $wgUser;
1059:			$user = $wgUser;

extensions/CentralNotice/includes/CNDatabase.php
28:		global $wgCentralDBname, $wgDBname, $wgRequest, $wgUser;

extensions/CheckUser/CheckUser.hooks.php
427:		global $wgUser;
428:		if ( $wgUser->isAllowed( 'checkuser' ) ) {
436:		if ( $wgUser->isAllowed( 'checkuser-log' ) ) {

extensions/CodeReview/api/CodeRevisionCommitterApi.php
15:		global $wgUser;
16:		return $wgUser->isAllowed( $permission );

extensions/CodeReview/backend/CodeRevision.php
704:			$wgCodeReviewCommentWatcherName, $wgUser;
732:			if ( $wgUser->getId() == $user->getId() ) {
757:		global $wgUser;
766:			'cc_user' => $wgUser->getId(),
767:			'cc_user_text' => $wgUser->getName(),
1391:		global $wgLang, $wgUser;
1401:			IRCColourfulRCFeedFormatter::cleanupForIRC( $wgUser->getName() ),
1414:		global $wgUser;
1424:			IRCColourfulRCFeedFormatter::cleanupForIRC( $wgUser->getName() ),

extensions/CodeReview/ui/CodeRepoListView.php
11:			global $wgUser;
14:			if ( $wgUser->isAllowed( 'repoadmin' ) ) {
38:		global $wgLang, $wgUser;
44:		if ( $wgUser->getId() ) {
45:			$author = $repo->wikiUserAuthor( $wgUser->getName() );
51:		if ( $wgUser->isAllowed( 'codereview-post-comment' ) ) {
52:			$userName = $wgUser->getName();
62:		if ( $wgUser->isAllowed( 'repoadmin' ) ) {

extensions/CodeReview/ui/CodeRevisionAuthorLink.php
19:		global $wgRequest, $wgUser;
20:		if ( !$wgUser->isAllowed( 'codereview-link-user' ) ) {
32:		global $wgOut, $wgUser;
37:		$form .= Html::hidden( 'linktoken', $wgUser->getEditToken( 'link' ) );
63:		global $wgOut, $wgRequest, $wgUser;
66:		if ( !$wgUser->matchEditToken( $wgRequest->getVal( 'linktoken' ), 'link' ) ) {

extensions/CodeReview/ui/CodeRevisionAuthorView.php
31:		global $wgOut, $wgUser;
38:		if ( $wgUser->isAllowed( 'codereview-link-user' ) ) {

extensions/CodeReview/ui/CodeRevisionCommitter.php
5:		global $wgRequest, $wgOut, $wgUser;
7:		if ( !$wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ) ) {
80:		global $wgUser;
88:			$statusChanged = $this->mRev->setStatus( $status, $wgUser );
99:			$this->mRev->changeTags( $validAddTags, $validRemoveTags, $wgUser );
103:			$this->mRev->addSignoff( $wgUser, $addSignoffs );
107:			$this->mRev->strikeSignoffs( $wgUser, $strikeSignoffs );
142:					$wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->getOldStatus(),
147:					$wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->getOldStatus(),
152:					$wgUser->getName(), $url, $this->mRev->getIdStringUnique(), $this->text,

extensions/CodeReview/ui/CodeRevisionListView.php
79:		global $wgOut, $wgUser, $wgRequest;
89:		if ( $wgRequest->wasPosted() && count( $revisions ) && $wgUser->matchEditToken( $editToken ) ) {
102:		$this->batchForm = $wgUser->isAllowed( 'codereview-set-status' ) ||
103:			$wgUser->isAllowed( 'codereview-add-tag' );
139:		global $wgRequest, $wgUser, $wgOut;
154:		if ( $wgUser->isAllowed( 'codereview-add-tag' ) &&
160:				$rev->changeTags( $addTags, $removeTags, $wgUser );
164:		if ( $wgUser->isAllowed( 'codereview-set-status' ) &&
167:				$rev->setStatus( $status, $wgUser );
188:		global $wgUser;
192:		if ( $wgUser->isAllowed( 'codereview-set-status' ) ) {
202:		if ( $wgUser->isAllowed( 'codereview-add-tag' ) ) {
214:		$changeInterface .= Html::hidden( 'wpBatchChangeEditToken', $wgUser->getEditToken() );

extensions/CodeReview/ui/CodeRevisionView.php
270:		global $wgRequest, $wgUser;
271:		if ( $wgRequest->wasPosted() && $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ) ) {
287:		global $wgUser;
288:		return $wgUser->isAllowed( 'codereview-post-comment' ) && !$wgUser->isBlocked();
295:		global $wgUser;
296:		return $wgUser->isAllowed( 'codereview-signoff' ) && !$wgUser->isBlocked();
303:		global $wgUser;
304:		return $wgUser->isAllowed( 'codereview-associate' ) && !$wgUser->isBlocked();
360:		global $wgUser;
370:		if ( $wgUser->isAllowed( 'codereview-add-tag' ) ) {
410:		global $wgUser;
411:		if ( $wgUser->isAllowed( 'codereview-set-status' ) ) {
885:		global $wgUser;
899:			Html::hidden( 'wpEditToken', $wgUser->getEditToken() ) .
953:		global $wgUser;
958:			if ( $s->userText == $wgUser->getName() && !$s->isStruck() ) {

extensions/CodeReview/ui/CodeView.php
47:		global $wgRequest, $wgUser;
49:			&& $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) )
50:			&& $wgUser->isAllowed( $permission );

extensions/CodeReview/ui/SpecialRepoAdmin.php
37:		global $wgRequest, $wgUser;
41:		if ( !$this->userCanExecute( $wgUser ) ) {
140:		global $wgOut, $wgRequest, $wgUser;
145:		if ( $wgRequest->wasPosted() && $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $this->repoName ) ) {
185:			Html::hidden( 'wpEditToken', $wgUser->getEditToken( $this->repoName ) ) .

extensions/Collection/Collection.body.php
442:		global $wgUser, $wgCommunityCollectionNamespace;
446:		$t = wfMessage( 'coll-user_book_prefix', $wgUser->getName() )->inContentLanguage();
448:			$userPageTitle = $wgUser->getUserPage()->getPrefixedText();

extensions/ConfirmEdit/SimpleCaptcha/Captcha.php
758:		global $wgUser, $wgRequest;
772:			return $this->passCaptchaLimitedFromRequest( $wgRequest, $wgUser );
839:		global $wgCaptchaTriggers, $wgUser;
840:		$creatingUser = $creatingUser ?: $wgUser;
865:		global $wgCaptchaTriggers, $wgUser, $wgRequest;
868:			if ( $wgUser->isAllowed( 'skipcaptcha' ) ) {
882:			$this->trigger = "{$wgUser->getName()} sending email";
883:			if ( !$this->passCaptchaLimitedFromRequest( $wgRequest, $wgUser ) ) {
1090:		global $wgParser, $wgUser;
1093:		$text = $wgParser->preSaveTransform( $text, $title, $wgUser, $options );

extensions/ContributionTracking/ContributionTracking_Tester.php
20:		global $wgUser;
21:		if ( !$this->userCanExecute( $wgUser ) ) {

extensions/DisableAccount/DisableAccount_body.php
47:		global $wgOut, $wgUser;
77:		$logEntry->setPerformer( $wgUser );

extensions/DonationInterface/gateway_common/GatewayType.php
357:	 * We use this in place of $wgUser->editToken() b/c currently
358:	 * $wgUser->editToken() is broken (apparently by design) for
359:	 * anonymous users.  Using $wgUser->editToken() currently exposes
361:	 * resolved in $wgUser, we'll use our own methods for token

extensions/Echo/Hooks.php
749:			global $wgUser;
750:			$user = $wgUser;

extensions/Echo/includes/ForeignWikiRequest.php
41:		global $wgFullyInitialised, $wgUser;
44:			$wgUser->isSafeToLoad() &&

extensions/EducationProgram/EducationProgram.hooks.php
113:			global $wgUser;
116:			if ( $wgUser->isLoggedIn() && $wgUser->getOption( 'ep_showtoplink' ) ) {

extensions/FlaggedRevs/api/actions/ApiReview.php
36:		global $wgUser;
42:			if ( !$wgUser->isAllowed( 'review' ) ) {
48:		if ( $wgUser->isBlocked( false ) ) {
50:				$this->dieBlocked( $wgUser->getBlock() );
69:		$form = new RevisionReviewForm( $wgUser );
97:				FRInclusionCache::getRevIncludes( $article, $rev, $wgUser );

extensions/FlaggedRevs/api/actions/ApiStabilize.php
33:		global $wgUser;
45:		$errors = $this->title->getUserPermissionsErrors( 'stablesettings', $wgUser );
48:				$this->dieStatus( $this->errorArrayToStatus( $errors, $wgUser ) );
80:		global $wgUser, $wgContLang;
84:		$form = new PageStabilityGeneralForm( $wgUser );
214:		global $wgUser, $wgContLang;
217:		$form = new PageStabilityProtectForm( $wgUser );

extensions/FlaggedRevs/frontend/FlaggedRevsUI.hooks.php
10:		global $wgOut, $wgUser;
25:		if ( $wgUser->isAllowed( 'review' ) ) {
509:		global $wgUser;
522:			if ( !FlaggedRevs::useSimpleConfig() && $wgUser->isAllowed( 'review' ) ) {
586:		global $wgUser;
587:		if ( !$wgUser->isAllowed( 'review' ) ) {
598:				array( 'wl_user' => $wgUser->getId(), // this user
619:		global $wgUser, $wgOut, $wgRequest, $wgLang;
625:		$form = new PageStabilityProtectForm( $wgUser );
777:		global $wgUser, $wgRequest;
782:		} elseif ( wfReadOnly() || !$wgUser->isAllowed( 'stablesettings' ) ) {
785:		$form = new PageStabilityProtectForm( $wgUser );

extensions/FlaggedRevs/frontend/specialpages/actions/RevisionReview_body.php
195:		global $wgUser, $wgOut, $wgRequest;
204:		$form = new RevisionReviewForm( $wgUser );
274:		if ( !$wgUser->matchEditToken( $editToken ) ) {
278:		$permErrors = $title->getUserPermissionsErrors( 'review', $wgUser, false );

extensions/FlaggedRevs/maintenance/cachePendingRevs.php
24:		global $wgUser;
43:			FRInclusionCache::getRevIncludes( $article, $rev, $wgUser, 'regen' );

extensions/Flow/includes/Content/BoardContent.php
166:				global $wgUser;
167:				$user = $options ? $options->getUser() : $wgUser;

extensions/Flow/includes/Repository/UserNameBatch.php
65:	 * @param string $userName Non null to set known usernames like $wgUser

extensions/Flow/includes/TalkpageManager.php
227:		global $wgUser;
231:		$this->safeAllowCreation( $title, $wgUser, /* $mustNotExist = */ true );

extensions/Flow/includes/TemplateHelper.php
239:		global $wgLang, $wgUser;
254:				'time_readable' => $wgLang->userTimeAndDate( $timestamp, $wgUser ),

extensions/GeoCrumbs/GeoCrumbs.class.php
174:		global $wgUser;
184:		return $page->getParserOutput( $page->makeParserOptions( $wgUser ) );

extensions/GettingStarted/Hooks.php
436:		global $wgGettingStartedRunTest, $wgUser;
438:		$experiment = new TaskRecommendationsExperimentV1( $wgUser );
443:			$wgUser->getEditCount() > 0

extensions/GlobalBlocking/includes/GlobalBlockingHooks.php
103:		global $wgUser, $wgRequest;
105:		if ( GlobalBlocking::getUserBlockErrors( $wgUser, $wgRequest->getIP() ) ) {

extensions/GlobalCssJs/removeOldManualUserPages.php
96:		global $wgUser;
102:		$wgUser = $user;

extensions/GWToolset/includes/Jobs/UploadMediafileJob.php
60:		global $wgUser;
76:		// AbuseFilter still looks at $wgUser in an UploadVerifyFile hook
77:		$oldUser = $wgUser;
78:		$wgUser = $this->User;
79:		// This will automatically restore $wgUser, when $magicScopeVariable falls out of scope.
81:			global $wgUser;
82:			$wgUser = $oldUser;

extensions/JsonConfig/includes/JCSingleton.php
800:	public static function onAbortMove( /** @noinspection PhpUnusedParameterInspection */ Title $title, Title $newTitle, $wgUser, &$err, $reason ) {
843:	public static function onTitleMoveComplete( /** @noinspection PhpUnusedParameterInspection */ $title, $newTitle, $wgUser, $pageid, $redirid, $reason ) {

extensions/LdapAuthentication/LdapAuthenticationPlugin.php
1073:		global $wgUser;
1093:		# If $wgUser isn't defined yet, it might be due to an LDAPAutoAuthDomain config.
1094:		if ( isset( $wgUser ) && $wgUser->isLoggedIn() && $wgUser->getToken( false ) ) {
1096:			$domain = self::loadDomain( $wgUser );

extensions/LiquidThreads/api/ApiQueryLQTThreads.php
331:			// Rendering uses $wgUser

extensions/LiquidThreads/classes/Hooks.php
79:		global $wgUser, $wgOut;
82:		if ( ! LqtDispatch::isLqtPage( $wgUser->getTalkPage() ) ) {
89:		$usertalk_t = $wgUser->getTalkPage();
90:		if ( $wgUser->getNewtalk()
108:		global $wgLiquidThreadsEnableNewMessages, $wgOut, $wgUser;
127:		$talkpage_messages = NewMessages::newUserMessages( $wgUser );
130:		$watch_messages = NewMessages::watchedThreadsForUser( $wgUser );
514:		global $wgUser;
516:		if ( $wgUser->isAnon() ) {
523:			$newMessagesCount = NewMessages::newMessageCount( $wgUser );

extensions/LiquidThreads/classes/ParserFunctions.php
106:		global $wgUser, $wgRequest, $wgOut;
110:		$view = new TalkpageView( $wgOut, $article, $title, $wgUser, $wgRequest );
134:		global $wgUser, $wgRequest, $wgOut;
141:		$view = new LqtView( $wgOut, $article, $title, $wgUser, $wgRequest );

extensions/LiquidThreads/classes/Thread.php
78:		global $wgUser;
80:		$thread->setAuthor( $wgUser );
111:		NewMessages::writeMessageStateForUpdatedThread( $thread, $change_type, $wgUser );
113:		if ( $wgUser->getOption( 'lqt-watch-threads', false ) ) {
114:			WatchAction::doWatch( $thread->topmostThread()->root()->getTitle(), $wgUser );
164:		global $wgUser;
192:			NewMessages::writeMessageStateForUpdatedThread( $this, $change_type, $wgUser );
239:		global $wgUser;
247:			if ( ( $wgUser->getId() == 0 && $originalAuthor->getName() != $wgUser->getName() )
248:					|| $wgUser->getId() != $originalAuthor->getId() ) {
380:		global $wgUser;
422:		NewMessages::writeMessageStateForUpdatedThread( $this, $this->type, $wgUser );
1527:				global $wgUser;
1532:					$t = Threads::newReplyTitle( $replyTo, $wgUser );

extensions/LiquidThreads/classes/ThreadRevision.php
53:			global $wgUser;
54:			$user = $wgUser;

extensions/LiquidThreads/classes/View.php
491:		global $wgUser;
492:		$view = new LqtView( $output, $talkpage, $title, $wgUser, $request );
991:			global $wgUser;
992:			$signature = LqtView::getUserSignature( $wgUser );
1087:			global $wgUser;
1088:			$signature = LqtView::getUserSignature( $wgUser );

extensions/LiquidThreads/pages/TalkpageView.php
51:		global $wgUser;
78:			if ( $wgUser->isAllowed( 'delete' ) ) {

extensions/LiquidThreads/pages/ThreadActionPage.php
10:		global $wgOut, $wgUser, $wgRequest;
12:		$this->user = $wgUser;
23:		global $wgOut, $wgUser;
25:		if ( !$this->userCanExecute( $wgUser ) ) {

extensions/MassMessage/includes/job/MassMessageJob.php
273:		global $wgHooks, $wgUser, $wgRequest;
281:		$oldUser = $wgUser;
290:		$wgUser = $this->getUser();
291:		$wgUser->clearInstanceCache(); // Force rights reload (for IP block exemption)
299:		$context->setUser( $wgUser );
347:		$wgUser = $oldUser;

extensions/Math/maintenance/MathGenerateTests.php
65:		global $wgUser;
71:		$wgUser = User::newFromName( $userName );

extensions/Math/Math.hooks.php
106:		global $wgUser;
112:				$user = $wgUser;
294:		global $wgUser;
297:		$wgUser->setOption( 'math', 'source' );

extensions/Nuke/Nuke.hooks.php
15:		global $wgUser;
17:		if ( $wgUser->isAllowed( 'nuke' ) ) {

extensions/OATHAuth/OATHAuth.hooks.php
58:	 * Determine if two-factor authentication is enabled for $wgUser
68:		global $wgUser;
70:		$user = self::getOATHUserRepository()->findByUser( $wgUser );

extensions/OpenStackManager/api/ApiNovaInstance.php
36:		global $wgUser;

extensions/OpenStackManager/nova/OpenStackNovaController.php
81:		global $wgUser;
94:						if ( !$wgUser->isAllowed( 'accessrestrictedregions' ) && in_array( $endpoint->region, $wgOpenStackManagerRestrictedRegions ) ) {

extensions/OpenStackManager/nova/OpenStackNovaInstance.php
318:		global $wgUser;
324:		OpenStackManagerEvent::createDeletionEvent( $this->getInstanceName(), $this->getProject(), $wgUser );

extensions/OpenStackManager/nova/OpenStackNovaUser.php
29:		global $wgUser;
44:			$this->userDN = $ldap->getUserDN( strtolower( $wgUser->getName() ) );
45:			$this->username = $wgUser->getName();
46:			$ldap->printDebug( "Fetching userdn using wiki name: " . $wgUser->getName(), NONSENSITIVE );
522:		global $wgUser;
550:			return TitleBlacklistHooks::acceptNewUserName( $shellaccountname, $wgUser, $message, $override = false, $log = true );
592:		global $wgUser, $wgMemc;
593:		if ( $wgUser->isLoggedIn() ) {
594:			$key = wfMemcKey( 'openstackmanager', 'roles', $wgUser->getName() );

extensions/OpenStackManager/special/SpecialNovaInstance.php
552:		global $wgUser;
591:		global $wgUser;

extensions/ORES/includes/Hooks.php
134:		global $wgUser, $wgOresDamagingLevels, $wgOresGoodfaithLevels;
136:		if ( !self::oresEnabled( $wgUser ) ) {
166:				self::hideNonDamagingFilter( $fields, $conds, $hideNonDamaging, $wgUser );
413:		global $wgUser;
416:			$threshold = self::getThreshold( 'damaging', $wgUser );

extensions/PagedTiffHandler/PagedTiffHandler_body.php
490:		global $wgUser, $wgThumbLimits;
499:			$sz = $wgUser->getOption( 'thumbsize' );

extensions/PageForms/includes/PF_CreatePageJob.php
39:		// change global $wgUser variable to the one
42:		global $wgUser;
43:		$actual_user = $wgUser;
44:		$wgUser = User::newFromId( $this->params['user_id'] );
53:		if ( $wgUser->isAllowed( 'bot' ) ) {
66:		$wgUser = $actual_user;

extensions/PageForms/includes/PF_FormEditAction.php
132:		global $wgUser;
133:		if ( ! $wgUser->isAllowed( 'viewedittab' ) ) {

extensions/PageForms/includes/PF_FormField.php
153:		global $wgParser, $wgUser;
192:				$f->mIsRestricted = ( ! $wgUser || ! $wgUser->isAllowed( 'editrestrictedfields' ) );
317:						$wgUser->getEffectiveGroups(), array_map( 'trim', explode( ',', $sub_components[1] ) )

extensions/PageForms/includes/PF_FormPrinter.php
657:		global $wgRequest, $wgUser, $wgParser;
734:			// $userCanEditPage = ( $wgUser->isAllowed( 'edit' ) && $this->mPageTitle->userCan( 'edit' ) );
735:			$permissionErrors = $this->mPageTitle->getUserPermissionsErrors( 'edit', $wgUser );
749:			if ( $wgUser->isAnon() && ! $is_query ) {
769:			$wgParser->Options( ParserOptions::newFromUser( $wgUser ) );
1100:							$cur_value_in_template = $wgUser->getName();
1526:			$form_text .= Html::hidden( 'wpEditToken', $wgUser->getEditToken() );

extensions/PageForms/includes/PF_FormUtils.php
68:		global $wgPageFormsTabIndex, $wgUser, $wgParser;
72:			$is_checked = $wgUser->getOption( 'minordefault' );
98:		global $wgPageFormsTabIndex, $wgUser, $wgTitle, $wgParser;
104:			if ( $wgUser->getOption( 'watchdefault' ) ) {
107:			} elseif ( $wgUser->getOption( 'watchcreations' ) && !$wgTitle->exists() ) {
110:			} elseif ( $wgUser->isWatched( $wgTitle ) ) {
273:		global $wgUser;
282:		if ( $wgUser->isAllowed( 'minoredit' ) ) {
286:		if ( $wgUser->isLoggedIn() ) {

extensions/PageForms/includes/PF_HelperFormAction.php
73:		global $wgRequest, $wgUser;
75:		if ( $wgUser->isAllowed( 'edit' ) && $title->userCan( 'edit' ) ) {
116:		global $wgUser;
117:		if ( ! $wgUser->isAllowed( 'viewedittab' ) ) {

extensions/PageForms/includes/PF_PageSchemas.php
661:		global $wgUser;
706:		$params['user_id'] = $wgUser->getId();
718:		global $wgUser;
786:					$params['user_id'] = $wgUser->getId();
825:				$params['user_id'] = $wgUser->getId();

extensions/PageForms/includes/PF_PageSection.php
27:		global $wgUser;
42:				$ps->mIsRestricted = !( $wgUser && $wgUser->isAllowed( 'editrestrictedfields' ) );

extensions/PageForms/includes/PF_Utils.php
130:		global $wgUser, $wgPageFormsScriptPath;
149:		$form_body .= Html::hidden( 'wpEditToken', $wgUser->isLoggedIn() ? $wgUser->getEditToken() : EDIT_TOKEN_SUFFIX );

extensions/PageForms/specials/PF_RunQuery.php
35:		global $wgUser;
87:			$wgParser->mOptions = ParserOptions::newFromUser( $wgUser );

extensions/PageForms/specials/PF_UploadWindow.php
664:		global $wgParser, $wgUser;
667:		$options = ParserOptions::newFromUser( $wgUser );
670:		$text = $wgParser->preSaveTransform( $text, $title, $wgUser, $options );

extensions/PageTriage/PageTriage.hooks.php
35:		global $wgUser;
37:		if ( self::addToPageTriageQueue( $pageId, $newTitle, $wgUser ) ) {
374:		global $wgUser, $wgPageTriageMarkPatrolledLinkExpiry, $wgOut,
383:		if ( !$wgUser->isLoggedIn() ) {
404:		$lastUse = $wgUser->getOption( 'pagetriage-lastuse' );
419:			&& !( $wgUser->getId() == $article->getOldestRevision()->getUser()
420:				&& !$wgUser->isAllowed( 'autopatrol' )

extensions/PageTriage/tests/phpunit/ApiPageTriageActionTest.php
83:		global $wgUser;
85:		$wgUser = self::$users['one']->getUser();
105:		global $wgUser;
107:		$wgUser = self::$users['two']->getUser();
126:			global $wgUser;
128:			$wgUser = self::$users['one']->getUser();

extensions/PageTriage/tests/phpunit/SpecialNewPagesFeedTest.php
81:		global $wgUser;
83:		$wgUser = self::$users['one']->getUser();

extensions/Renameuser/Renameuser.hooks.php
47:		global $wgUser;
49:		if ( $id && $wgUser->isAllowed( 'renameuser' ) ) {

extensions/SecurePoll/includes/user/Auth.php
197:		global $wgUser;
198:		if ( $wgUser->isAnon() ) {
201:		$params = $this->getUserParams( $wgUser );

extensions/SemanticForms/includes/SF_CreatePageJob.php
37:		// change global $wgUser variable to the one
40:		global $wgUser;
41:		$actual_user = $wgUser;
42:		$wgUser = User::newFromId( $this->params['user_id'] );
49:		$wgUser = $actual_user;

extensions/SemanticForms/includes/SF_FormEditAction.php
128:		global $wgUser;
129:		if ( ! $wgUser->isAllowed( 'viewedittab' ) ) {

extensions/SemanticForms/includes/SF_FormField.php
147:		global $wgParser, $wgUser;
186:				$f->mIsRestricted = ( ! $wgUser || ! $wgUser->isAllowed( 'editrestrictedfields' ) );
301:						$wgUser->getEffectiveGroups(), array_map( 'trim', explode( ',', $sub_components[1] ) )

extensions/SemanticForms/includes/SF_FormPrinter.php
625:		global $wgRequest, $wgUser, $wgParser;
702:			// $userCanEditPage = ( $wgUser->isAllowed( 'edit' ) && $this->mPageTitle->userCan( 'edit' ) );
703:			$permissionErrors = $this->mPageTitle->getUserPermissionsErrors( 'edit', $wgUser );
717:			if ( $wgUser->isAnon() && ! $is_query ) {
737:			$wgParser->Options( ParserOptions::newFromUser( $wgUser ) );
1063:							$cur_value_in_template = $wgUser->getName();
1490:			$form_text .= Html::hidden( 'wpEditToken', $wgUser->getEditToken() );

extensions/SemanticForms/includes/SF_FormUtils.php
65:		global $sfgTabIndex, $wgUser, $wgParser;
69:			$is_checked = $wgUser->getOption( 'minordefault' );
95:		global $sfgTabIndex, $wgUser, $wgTitle, $wgParser;
101:			if ( $wgUser->getOption( 'watchdefault' ) ) {
104:			} elseif ( $wgUser->getOption( 'watchcreations' ) && !$wgTitle->exists() ) {
107:			} elseif ( $wgUser->isWatched( $wgTitle ) ) {
265:		global $wgUser;
274:		if ( $wgUser->isAllowed( 'minoredit' ) ) {
278:		if ( $wgUser->isLoggedIn() ) {

extensions/SemanticForms/includes/SF_HelperFormAction.php
71:		global $wgRequest, $wgUser;
73:		if ( $wgUser->isAllowed( 'edit' ) && $title->userCan( 'edit' ) ) {
114:		global $wgUser;
115:		if ( ! $wgUser->isAllowed( 'viewedittab' ) ) {

extensions/SemanticForms/includes/SF_PageSchemas.php
661:		global $wgUser;
706:		$params['user_id'] = $wgUser->getId();
723:		global $wgUser;
791:					$params['user_id'] = $wgUser->getId();
830:				$params['user_id'] = $wgUser->getId();

extensions/SemanticForms/includes/SF_PageSection.php
27:		global $wgUser;
42:				$ps->mIsRestricted = !( $wgUser && $wgUser->isAllowed( 'editrestrictedfields' ) );

extensions/SemanticForms/includes/SF_Utils.php
106:		global $wgUser, $sfgScriptPath;
125:		$form_body .= Html::hidden( 'wpEditToken', $wgUser->isLoggedIn() ? $wgUser->getEditToken() : EDIT_TOKEN_SUFFIX );

extensions/SemanticForms/specials/SF_RunQuery.php
35:		global $wgUser;
87:			$wgParser->mOptions = ParserOptions::newFromUser( $wgUser );

extensions/SemanticForms/specials/SF_UploadWindow.php
652:		global $wgParser, $wgUser;
655:		$options = ParserOptions::newFromUser( $wgUser );
658:		$text = $wgParser->preSaveTransform( $text, $title, $wgUser, $options );

extensions/SemanticMediaWiki/includes/articlepages/SMW_OrderedListPage.php
39:	 * Cache for the current skin, obtained from $wgUser.
59:		global $wgRequest, $wgUser;
65:		$diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) );

extensions/SemanticMediaWiki/includes/SMW_PageSchemas.php
168:		global $wgUser;
172:		$jobParams['user_id'] = $wgUser->getId();

extensions/SemanticMediaWiki/SemanticMediaWiki.hooks.php
226:		global $wgUser;
228:		if ( $wgUser->isAllowed( 'purge' ) ) {

extensions/SemanticMediaWiki/specials/Export/SMW_SpecialOWLExport.php
77:		global $wgOut, $wgUser, $smwgAllowRecursiveExport, $smwgExportBacklinks, $smwgExportAll;
84:		if ( $wgUser->isAllowed( 'delete' ) || $smwgAllowRecursiveExport ) {
88:		if ( $wgUser->isAllowed( 'delete' ) || $smwgExportBacklinks ) {
92:		if ( $wgUser->isAllowed( 'delete' ) || $smwgExportAll ) {
140:		global $wgRequest, $smwgExportBacklinks, $wgUser, $smwgAllowRecursiveExport;
152:		if ( ( $rec == '1' ) && ( $smwgAllowRecursiveExport || $wgUser->isAllowed( 'delete' ) ) ) {
164:		if ( ( $bl == '1' ) && ( $wgUser->isAllowed( 'delete' ) ) ) {

extensions/SemanticMediaWiki/specials/QueryPages/SMW_QueryPage.php
119:            global $wgUser;
120:            return $wgUser->getSkin();

extensions/SemanticMediaWiki/specials/SMWAdmin/SMW_SpecialSMWAdmin.php
33:		global $wgOut, $wgRequest, $wgServer, $wgArticlePath, $wgUser, $smwgAdminRefreshStore;
35:		if ( !$this->userCanExecute( $wgUser ) ) {

extensions/SemanticResultFormats/formats/calendar/SRF_Calendar.php
286:			global $wgUser;
287:			$skin = $wgUser->getSkin();

extensions/SpamBlacklist/maintenance/cleanup.php
64:	$wgUser = User::newSystemUser( $username, array( 'steal' => true ) );
66:	$wgUser = User::newFromName( $username );
67:	if ( $wgUser->idForName() == 0 ) {
69:		$status = $wgUser->addToDatabase();

extensions/SpamBlacklist/SpamBlacklist_body.php
321:		global $wgUser, $wgLogSpamBlacklistHits;
324:			$logEntry->setPerformer( $wgUser );

extensions/Thanks/Thanks.hooks.php
94:		global $wgUser;
96:		if ( $wgUser->getRequest()->getSessionData( "thanks-thanked-{$rev->getId()}" ) ) {
100:				wfMessage( 'thanks-thanked', $wgUser, $recipient->getName() )->text()
106:				->params( $wgUser->getName(), $recipient->getName() )
117:			wfMessage( 'thanks-thank', $wgUser, $recipient->getName() )->text()

extensions/TimedMediaHandler/ApiTranscodeReset.php
12:		global $wgUser, $wgEnableTranscode, $wgWaitTimeForTranscodeReset;
26:			if ( !$wgUser->isAllowed( 'transcode-reset' ) ) {

extensions/TimedMediaHandler/tests/phpunit/ApiTestCaseVideoUpload.php
94:		global $wgUser;
98:		$wgUser = self::$users['uploader']->getUser();

extensions/TimedMediaHandler/TimedMediaHandler.hooks.php
860:		global $wgTmhWebPlayer, $wgTmhUseBetaFeatures, $wgUser;
863:			$wgUser->isSafeToLoad() && BetaFeatures::isFeatureEnabled( $context->getUser(), 'tmh-videojs' )

extensions/TimedMediaHandler/TranscodeStatusTable.php
61:		global $wgUser;
99:		if ( $wgUser->isAllowed( 'transcode-reset' ) ) {
123:			if ( $wgUser->isAllowed( 'transcode-reset' ) ) {

extensions/TitleBlacklist/TitleBlacklist.hooks.php
214:		global $wgUser, $wgRequest;
216:		$sv = self::testUserName( $user->getName(), $wgUser, $override, true );
245:		global $wgUser;
288:		global $wgRequest, $wgUser;
290:		if ( TitleBlacklist::userCanOverride( $wgUser, 'new-account' ) ) {

extensions/TorBlock/includes/TorBlockHooks.php
44:		global $wgTorAllowedActions, $wgRequest, $wgUser;
51:		if ( $user->getName() !== $wgUser->getName() ) {

extensions/Translate/tag/TranslateMoveJob.php
53:		global $wgUser;
66:		$oldUser = $wgUser;
67:		$wgUser = $user;
114:		$wgUser = $oldUser;
194:		global $wgUser;
216:		$wgUser->clearInstanceCache();

extensions/Translate/tests/phpunit/PageTranslationTaggingTest.php
72:		global $wgUser;
79:			$wgUser
94:		$page->doUpdateRestrictions( array(), array(), $cascade, 'Test case', $wgUser );

extensions/UserMerge/MergeUser.php
380:		global $wgContLang, $wgUser;
402:		// Need to set $wgUser to attribute log properly.
403:		$oldUser = $wgUser;
404:		$wgUser = $performer;
467:		$wgUser = $oldUser;

extensions/Wikidata/extensions/ArticlePlaceholder/tests/phpunit/includes/ItemNotabilityFilterTest.php
68:		global $wgUser;
110:		$entityStore->saveEntity( $item0, 'ItemNotabilityFilterTest', $wgUser, EDIT_NEW );
111:		$entityStore->saveEntity( $item1, 'ItemNotabilityFilterTest', $wgUser, EDIT_NEW );
112:		$entityStore->saveEntity( $item2, 'ItemNotabilityFilterTest', $wgUser, EDIT_NEW );
113:		$entityStore->saveEntity( $item3, 'ItemNotabilityFilterTest', $wgUser, EDIT_NEW );

extensions/Wikidata/extensions/Wikibase/repo/maintenance/createBlacklistedItems.php
29:		global $wgUser;
31:		$user = $wgUser;

extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/Actions/ActionTestCase.php
58:		global $wgGroupPermissions, $wgUser;
75:		$wgUser->clearInstanceCache();
142:		global $wgUser,$wgLang;
161:		$context->setUser( $wgUser );     // determined by setUser()
210:		global $wgUser;
213:		if ( $user->getName() != $wgUser->getName() ) {
214:			$wgUser = $user;
254:		global $wgUser;
262:			$result = $this->createTestContentRevision( $entity, $id, $wgUser, $flags );

extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/Actions/EditEntityActionTest.php
890:		global $wgUser;
891:		return $wgUser->getEditToken();

extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/Api/ApiFormatTestCase.php
46:		global $wgUser,
50:			$params['token'] = $wgUser->getEditToken();
76:		global $wgUser;
81:		$entityRevision = $store->saveEntity( $property, 'testing', $wgUser, EDIT_NEW );
86:		global $wgUser;
91:		$entityRevision = $store->saveEntity( $item, 'testing', $wgUser, EDIT_NEW );
98:		global $wgUser;
115:		$entityRevision = $store->saveEntity( $item, 'testing more!', $wgUser );

extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/Api/CreateRedirectTest.php
171:		global $wgUser;
174:			$params['token'] = $wgUser->getToken();

extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/Api/FormatSnakValueTest.php
179:		global $wgUser;
195:				$store->deleteEntity( $id, 'test', $wgUser );
208:		$store->saveEntity( $item, 'testing', $wgUser, EDIT_NEW );
209:		$store->saveEntity( $property, 'testing', $wgUser, EDIT_NEW );

extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/Api/PermissionsTestCase.php
36:		global $wgUser;
38:		$this->setMwGlobals( 'wgUser', clone $wgUser );
43:			$this->doApiRequestWithToken( $params, null, $wgUser );

extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/Content/EntityContentFactoryTest.php
277:		global $wgUser;
301:			$status = $factory->getPermissionStatusForEntity( $wgUser, $action, $entity );
306:			$status = $factory->getPermissionStatusForEntityType( $wgUser, $action, $entity->getType() );
311:			$status = $factory->getPermissionStatusForEntityId( $wgUser, $action, $entity->getId() );

extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/Content/EntityContentTest.php
43:		global $wgGroupPermissions, $wgUser;
48:		$this->originalUser = $wgUser;
55:		global $wgUser;
60:			$wgUser = $this->originalUser;
63:		if ( $wgUser ) { // should not be null, but sometimes, it is
65:			$wgUser->clearInstanceCache();

extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/PermissionsHelper.php
14:	 * Automatically resets the rights cache for $wgUser.
15:	 * This modifies the global $wgGroupPermissions and $wgUser variables.
19:	 * @param string[]|null $groups groups to apply to $wgUser. If not given, group
26:		global $wgUser;
32:		$wgUser->addToDatabase();
35:			$oldGroups = $wgUser->getGroups();
37:				$wgUser->removeGroup( $group );
41:				$wgUser->addGroup( $group );
54:		$wgUser->addGroup( "dummy" );
55:		$wgUser->removeGroup( "dummy" );

extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityMetaDataLookupTest.php
42:			global $wgUser;
46:				$this->data[] = $store->saveEntity( new Item(), 'WikiPageEntityMetaDataLookupTest', $wgUser, EDIT_NEW );
51:			$this->data[2] = $store->saveEntity( $entity, 'WikiPageEntityMetaDataLookupTest', $wgUser );

extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityRedirectLookupTest.php
53:		global $wgUser;
58:		$entityStore->saveEntity( $item, "WikiPageEntityRedirectLookupTest", $wgUser, EDIT_NEW );
63:		$entityStore->saveRedirect( $redirect, "WikiPageEntityRedirectLookupTest", $wgUser, EDIT_NEW );
68:		$entityStore->saveRedirect( $redirect, "WikiPageEntityRedirectLookupTest", $wgUser, EDIT_NEW );
79:		global $wgUser;
92:			$wgUser

extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/Store/WikiPageEntityRevisionLookupTest.php
38:		global $wgUser;
41:		$revision = $store->saveEntity( $entity, "storeTestEntity", $wgUser );
47:		global $wgUser;
50:		$revision = $store->saveRedirect( $redirect, "storeTestEntity", $wgUser );

extensions/WikiEditor/WikiEditor.hooks.php
103:		global $wgWikiEditorFeatures, $wgUser;
115:					if ( $wgUser->getOption( $requirement ) != $value ) {

extensions/WikimediaEvents/WikimediaEventsHooks.php
274:		global $wgUser;
276:				'userId' => $wgUser->getId(),
277:				'userText' => $wgUser->getName(),

extensions/WikimediaIncubator/TestWikiRC.php
12:		global $wgUser, $wmincPref, $wgRequest;
14:		$projectvalue = $url ? $url['project'] : $wgUser->getOption( $wmincPref . '-project' );
15:		$codevalue = $url ? $url['lang'] : $wgUser->getOption( $wmincPref . '-code' );

extensions/WikimediaIncubator/WikimediaIncubator.class.php
258:		global $wgUser, $wmincPref, $wmincProjects, $wmincSisterProjects;
265:			$r = $wgUser->getOption( $wmincPref . '-project' ); # Defaults to preference
302:			global $wgUser, $wmincPref;
304:			$projectvalue = ( $url ? $url['project'] : $wgUser->getOption( $wmincPref . '-project' ) );
305:			$codevalue = ( $url ? $url['lang'] : $wgUser->getOption( $wmincPref . '-code' ) );
459:		global $wgUser;
460:		if ( $wgUser->isAllowed( 'viewuserlang' ) ) {

extensions/WikimediaMaintenance/cleanupMl.php
10:$wgUser = User::newSystemUser( 'Malayalam cleanup script', [ 'steal' => true ] );

includes/AjaxResponse.php
223:		global $wgCachePages, $wgCacheEpoch, $wgUser;
237:		$lastmod = wfTimestamp( TS_RFC2822, max( $timestamp, $wgUser->getTouched(), $wgCacheEpoch ) );
250:				&& $wgUser->validateCache( $ismodsince ) &&
258:				wfDebug( "$fname: CACHED client: $ismodsince ; user: {$wgUser->getTouched()} ; " .
263:				wfDebug( "$fname: READY  client: $ismodsince ; user: {$wgUser->getTouched()} ; " .

includes/api/ApiBase.php
1309:		// because it unstubs $wgUser

includes/api/ApiMain.php
232:				global $wgUser;
234:				$wgUser = new User();
235:				$this->getContext()->setUser( $wgUser );

includes/api/ApiQueryInfo.php
141:		global $wgUser;
142:		if ( !$wgUser->isAllowed( 'edit' ) ) {
148:			ApiQueryInfo::$cachedTokens['edit'] = $wgUser->getEditToken();
158:		global $wgUser;
159:		if ( !$wgUser->isAllowed( 'delete' ) ) {
165:			ApiQueryInfo::$cachedTokens['delete'] = $wgUser->getEditToken();
175:		global $wgUser;
176:		if ( !$wgUser->isAllowed( 'protect' ) ) {
182:			ApiQueryInfo::$cachedTokens['protect'] = $wgUser->getEditToken();
192:		global $wgUser;
193:		if ( !$wgUser->isAllowed( 'move' ) ) {
199:			ApiQueryInfo::$cachedTokens['move'] = $wgUser->getEditToken();
209:		global $wgUser;
210:		if ( !$wgUser->isAllowed( 'block' ) ) {
216:			ApiQueryInfo::$cachedTokens['block'] = $wgUser->getEditToken();
234:		global $wgUser;
235:		if ( !$wgUser->canSendEmail() || $wgUser->isBlockedFromEmailuser() ) {
241:			ApiQueryInfo::$cachedTokens['email'] = $wgUser->getEditToken();
251:		global $wgUser;
252:		if ( !$wgUser->isAllowedAny( 'import', 'importupload' ) ) {
258:			ApiQueryInfo::$cachedTokens['import'] = $wgUser->getEditToken();
268:		global $wgUser;
269:		if ( !$wgUser->isLoggedIn() ) {
275:			ApiQueryInfo::$cachedTokens['watch'] = $wgUser->getEditToken( 'watch' );
285:		global $wgUser;
286:		if ( !$wgUser->isLoggedIn() ) {
292:			ApiQueryInfo::$cachedTokens['options'] = $wgUser->getEditToken();

includes/api/ApiQueryRecentChanges.php
81:		global $wgUser;
86:			if ( ( $wgUser->useRCPatrol() && $rc->getAttribute( 'rc_type' ) == RC_EDIT ) ||
87:				( $wgUser->useNPPatrol() && $rc->getAttribute( 'rc_type' ) == RC_NEW )
91:		} elseif ( $wgUser->useRCPatrol() || $wgUser->useNPPatrol() ) {
100:				$cachedPatrolToken = $wgUser->getEditToken( 'patrol' );

includes/api/ApiQueryRevisions.php
78:		global $wgUser;
79:		if ( !$wgUser->isAllowed( 'rollback' ) ) {
83:		return $wgUser->getEditToken( 'rollback' );

includes/api/ApiQueryUsers.php
93:		global $wgUser;
97:		return $wgUser->getEditToken( $user->getName() );

includes/cache/GenderCache.php
64:		global $wgUser;
72:			if ( $this->misses >= $this->missLimit && $wgUser->getName() !== $username ) {

includes/cache/MessageCache.php
185:		global $wgUser;
188:			if ( !$wgUser->isSafeToLoad() ) {
189:				// $wgUser isn't unstubbable yet, so don't try to get a

includes/changes/ChangesList.php
584:	 * @param User $user User object to check, or null to use $wgUser

includes/changes/RecentChange.php
458:		global $wgUser;
468:		return $change->doMarkPatrolled( $wgUser, $auto, $tags );

includes/context/RequestContext.php
521:	 * This sets the current session, $wgUser, and $wgRequest from $params.
562:			global $wgRequest, $wgUser;
591:			$wgUser = $context->getUser(); // b/c

includes/EditPage.php
520:		global $wgOut, $wgRequest, $wgUser;
563:				$user = $wgUser;
650:		global $wgUser;
652:		$permErrors = $this->mTitle->getUserPermissionsErrors( 'edit', $wgUser, $rigor );
658:					$this->mTitle->getUserPermissionsErrors( 'create', $wgUser, $rigor ),
780:		global $wgRequest, $wgUser, $wgPreviewOnOpenNamespaces;
791:			&& $wgUser->getOption( 'previewonfirst' )
844:		global $wgContLang, $wgUser;
957:				&& $this->mTitle->getText() == $wgUser->getName()
962:					|| !$wgUser->getOption( 'forceeditsummary' );
1075:		global $wgUser;
1087:		if ( $wgUser->getOption( 'watchdefault' ) ) {
1090:		} elseif ( $wgUser->getOption( 'watchcreations' ) && !$this->mTitle->exists() ) {
1093:		} elseif ( $wgUser->isWatched( $this->mTitle ) ) {
1097:		if ( $wgUser->getOption( 'minordefault' ) && !$this->isNew ) {
1114:		global $wgOut, $wgRequest, $wgUser, $wgContLang;
1140:				$orig = $this->getOriginalContent( $wgUser );
1168:							$popts = ParserOptions::newFromUserAndLang( $wgUser, $wgContLang );
1169:							$newContent = $content->preSaveTransform( $this->mTitle, $wgUser, $popts );
1229:					$content = $this->getOriginalContent( $wgUser );
1363:		global $wgUser;
1377:		if ( $title === null || !$title->exists() || !$title->userCan( 'read', $wgUser ) ) {
1386:			if ( $title === null || !$title->exists() || !$title->userCan( 'read', $wgUser ) ) {
1393:		$parserOptions = ParserOptions::newFromUser( $wgUser );
1427:		global $wgUser;
1429:		$this->mTokenOk = $wgUser->matchEditToken( $token );
1430:		$this->mTokenOkExceptSuffix = $wgUser->matchEditTokenNoSuffix( $token );
1474:		global $wgUser;
1477:		$bot = $wgUser->isAllowed( 'bot' ) && $this->bot;
1495:		global $wgUser, $wgOut;
1582:				throw new UserBlockedError( $wgUser->getBlock() );
1721:		global $wgUser, $wgRequest, $wgParser, $wgMaxArticleSize;
1737:				$wgUser->getName() .
1766:			!$wgUser->isAllowed( 'upload' )
1768:				$code = $wgUser->isAnon() ? self::AS_IMAGE_REDIRECT_ANON : self::AS_IMAGE_REDIRECT_LOGGED;
1816:		if ( $wgUser->isBlockedFrom( $this->mTitle, false ) ) {
1819:				$wgUser->spreadAnyEditBlock();
1834:		if ( !$wgUser->isAllowed( 'edit' ) ) {
1835:			if ( $wgUser->isAnon() ) {
1851:			} elseif ( !$wgUser->isAllowed( 'editcontentmodel' ) ) {
1858:			if ( !$titleWithNewContentModel->userCan( 'editcontentmodel', $wgUser )
1859:				|| !$titleWithNewContentModel->userCan( 'edit', $wgUser )
1871:				$this->changeTags, $wgUser );
1883:		if ( $wgUser->pingLimiter() || $wgUser->pingLimiter( 'linkpurge', 0 )
1884:			|| ( $changingContentModel && $wgUser->pingLimiter( 'editcontentmodel' ) )
1905:			if ( !$this->mTitle->userCan( 'create', $wgUser ) ) {
1929:			if ( !$this->runPostMergeFilters( $textbox_content, $status, $wgUser ) ) {
1965:					if ( $this->page->getUserText() == $wgUser->getName() &&
1981:						$wgUser->getId(), $this->edittime
2051:			if ( !$this->runPostMergeFilters( $content, $status, $wgUser ) ) {
2072:				&& !$content->equals( $this->getOriginalContent( $wgUser ) )
2142:			$wgUser,
2166:			$wgUser->pingLimiter( 'linkpurge' );
2175:				$wgUser,
2209:		global $wgUser;
2211:		if ( !$wgUser->isLoggedIn() ) {
2215:		$user = $wgUser;
2329:		global $wgOut, $wgUser, $wgAjaxEditStash, $wgCookieSetOnAutoblock;
2337:		if ( $wgUser->getOption( 'showtoolbar' ) ) {
2345:		if ( $wgUser->getOption( 'uselivepreview' ) ) {
2349:		if ( $wgUser->getOption( 'useeditwarning' ) ) {
2390:		global $wgOut, $wgUser;
2464:			if ( $wgUser->isLoggedIn() ) {
2591:		global $wgOut, $wgUser;
2625:		if ( $wgUser->getOption( 'previewontop' ) ) {
2754:		if ( !$this->isCssJsSubpage && $showToolbar && $wgUser->getOption( 'showtoolbar' ) ) {
2831:		if ( !$wgUser->getOption( 'previewontop' ) ) {
2878:		global $wgOut, $wgUser;
2927:					if ( !$revision->userCan( Revision::DELETED_TEXT, $wgUser ) ) {
2958:		} elseif ( $wgUser->isAnon() ) {
2987:				if ( $this->getTitle()->isSubpageOf( $wgUser->getUserPage() ) ) {
3140:		global $wgOut, $wgUser;
3153:		$wgOut->addHTML( "\n" . Html::hidden( "wpEditToken", $wgUser->getEditToken() ) . "\n" );
3227:		global $wgOut, $wgUser;
3232:		$attribs = $this->buildTextboxAttribs( $name, $customAttribs, $wgUser );
3307:		global $wgUser, $wgContLang, $wgOut;
3337:			$popts = ParserOptions::newFromUserAndLang( $wgUser, $wgContLang );
3338:			$newContent = $newContent->preSaveTransform( $this->mTitle, $wgUser, $popts );
3851:		global $wgUser;
3853:		$pstContent = $content->preSaveTransform( $this->mTitle, $wgUser, $parserOptions );
3855:			$this->mTitle, $pstContent, $wgUser );
4031:		global $wgUser, $wgUseMediaWikiUIEverywhere;
4039:			if ( $wgUser->isAllowed( 'minoredit' ) ) {
4063:		if ( $wgUser->isLoggedIn() ) {

includes/FeedUtils.php
39:		global $wgRequest, $wgUser;
43:		if ( $purge && $wgUser->isAllowed( 'purge' ) ) {

includes/FileDeleteForm.php
64:		global $wgOut, $wgRequest, $wgUser, $wgUploadMaintenance;
66:		$permissionErrors = $this->title->getUserPermissionsErrors( 'delete', $wgUser );
84:		$suppress = $wgRequest->getVal( 'wpSuppress' ) && $wgUser->isAllowed( 'suppressrevision' );
100:		if ( $wgRequest->wasPosted() && $wgUser->matchEditToken( $token, $this->oldimage ) ) {
120:				$wgUser
136:				WatchAction::doWatchOrUnwatch( $wgRequest->getCheck( 'wpWatch' ), $this->title, $wgUser );
162:			global $wgUser;
163:			$user = $wgUser;
229:		global $wgOut, $wgUser, $wgRequest;
231:		if ( $wgUser->isAllowed( 'suppressrevision' ) ) {
243:		$checkWatch = $wgUser->getBoolOption( 'watchdeletion' ) || $wgUser->isWatched( $this->title );
248:			Html::hidden( 'wpEditToken', $wgUser->getEditToken( $this->oldimage ) ) .
276:		if ( $wgUser->isLoggedIn() ) {
304:			if ( $wgUser->isAllowed( 'editinterface' ) ) {

includes/filerepo/file/ArchivedFile.php
568:	 * @param null|User $user User object to check, or null to use $wgUser

includes/filerepo/file/File.php
1783:	 * @param null|User $user User object or null to use $wgUser
2143:	 * @param User $user User object to check, or null to use $wgUser

includes/filerepo/file/ForeignDBFile.php
75:	 * @param User $user User object or null to use $wgUser

includes/filerepo/file/LocalFile.php
1171:	 * @param User|null $user User object or null to use $wgUser
1242:	 * @param User|null $user User object or null to use $wgUser
1248:			global $wgUser;
1249:			$user = $wgUser;
1280:			global $wgUser;
1281:			$user = $wgUser;
2119:			global $wgUser;
2120:			$this->user = $wgUser;

includes/filerepo/file/OldLocalFile.php
314:	 * @param User|null $user User object to check, or null to use $wgUser

includes/GlobalFunctions.php
1237:	// Don't load $wgUser at this late stage just for statistics purposes

includes/installer/Installer.php
400:		global $wgMemc, $wgUser, $wgObjectCaches;
425:		$wgUser = User::newFromId( 0 );
426:		RequestContext::getMain()->setUser( $wgUser );
447:		$this->parserOptions = new ParserOptions( $wgUser ); // language will be wrong :(

includes/jobqueue/jobs/DoubleRedirectJob.php
161:		global $wgUser;
162:		$oldUser = $wgUser;
163:		$wgUser = $user;
172:		$wgUser = $oldUser;

includes/Linker.php
924:		global $wgUser, $wgDisableAnonTalk, $wgLang;
950:		if ( $blockable && $wgUser->isAllowed( 'block' ) ) {
954:		if ( $addEmailLink && $wgUser->canSendEmail() ) {

includes/logging/LogEventsList.php
481:				global $wgUser;
482:				$match = $wgUser->isAllowed( $right );
495:	 * @param User $user User to check, or null to use $wgUser
508:	 * @param User $user User to check, or null to use $wgUser
514:				global $wgUser;
515:				$user = $wgUser;
713:	 * @param User $user User to check, or null to use $wgUser
720:			global $wgUser;
721:			$user = $wgUser;

includes/logging/LogPage.php
329:	 * @param null|int|User $doer The user doing the action. null for $wgUser
356:			global $wgUser;
357:			$doer = $wgUser;

includes/logging/PatrolLog.php
35:	 * @param User $user User performing the action or null to use $wgUser
57:			global $wgUser;
58:			$user = $wgUser;

includes/OutputPage.php
1567:			// Someone is trying to set a bogus pre-$wgUser PO. Check if it has
1579:				// $wgUser isn't unstubbable yet, so don't try to get a
1596:			// They're trying to restore the bogus pre-$wgUser PO. Do the right

includes/page/Article.php
41:	/** @var ParserOptions ParserOptions object for $wgUser articles */

includes/page/WikiPage.php
673:	 *   Revision::FOR_THIS_USER    to be displayed to $wgUser
1567:		global $wgUser, $wgUseAutomaticEditSummaries;
1591:		$user = $user ?: $wgUser;
2008:		global $wgContLang, $wgUser, $wgAjaxEditStash;
2023:		$user = is_null( $user ) ? $wgUser : $user;
2773:		global $wgUser, $wgContentHandlerUseDB;
2788:		$user = is_null( $user ) ? $wgUser : $user;

includes/parser/Parser.php
57: * @warning $wgUser or $wgTitle or $wgRequest or $wgLang. Keep them away!

includes/parser/ParserOptions.php
638:			global $wgUser;
639:			if ( $wgUser === null ) {
642:				$user = $wgUser;

includes/Revision.php
631:			global $wgUser; // ugh
651:				? strval( $row['user_text'] ) : $wgUser->getName();
652:			$this->mUser = isset( $row['user'] ) ? intval( $row['user'] ) : $wgUser->getId();
1045:	 *   Revision::FOR_THIS_USER    to be displayed to $wgUser
1656:	 * @param User|null $user User object to use or null for $wgUser
1683:				global $wgUser;
1684:				$user = $wgUser;
1724:	 * @param User|null $user User object to check, or null to use $wgUser
1740:	 * @param User|null $user User object to check, or null to use $wgUser
1750:				global $wgUser;
1751:				$user = $wgUser;

includes/ServiceWiring.php
303:		global $wgUser;
308:			return $services->getLinkRendererFactory()->createForUser( $wgUser );

includes/session/SessionProvider.php
144:	 *  before $wgUser, $wgLang, $wgOut, $wgParser, $wgTitle, and corresponding
472:	 *  use $wgUser, $wgLang, $wgOut, $wgParser, or their equivalents via

includes/Setup.php
773: * @var User $wgUser
775:$wgUser = RequestContext::getMain()->getUser(); // BackCompat

includes/specialpage/LoginSignupSpecialPage.php
473:		global $wgUser, $wgLang;
484:		$wgUser = $user;

includes/specialpage/SpecialPageFactory.php
425:	 * @param User $user User object to check permissions, $wgUser will be used
432:			global $wgUser;
433:			$user = $wgUser;
471:	 * @param User|null $user User object to use or null for $wgUser
477:			global $wgUser;
478:			$user = $wgUser;
587:	 * Also saves the current $wgTitle, $wgOut, $wgRequest, $wgUser and $wgLang
599:		global $wgTitle, $wgOut, $wgRequest, $wgUser, $wgLang;
607:			'user' => $wgUser,
622:		$wgUser = $context->getUser();
637:		$wgUser = $glob['user'];

includes/specials/SpecialEditWatchlist.php
101:		# was $wgUser

includes/specials/SpecialUndelete.php
366:	 * @param User $user User performing the action, or null to use $wgUser
427:			global $wgUser;
428:			$user = $wgUser;

includes/Title.php
1884:	 * @param User $user User to check (since 1.19); $wgUser will be used if not provided.
1895:	 * @param User $user User to check (since 1.19); $wgUser will be used if not
1902:			global $wgUser;
1903:			$user = $wgUser;
3600:	 * @param bool $auth Whether to check user permissions (uses $wgUser)
3605:		global $wgUser;
3618:				$mp->checkPermissions( $wgUser, $reason )->getErrorsArray()
3632:		global $wgUser;
3638:		if ( !$wgUser->isAllowed( 'reupload-shared' )
3652:	 * @param bool $auth Indicates whether $wgUser's permissions
3663:		global $wgUser;
3667:			$wgUser->spreadAnyEditBlock();
3671:		if ( $auth && !$wgUser->isAllowed( 'suppressredirect' ) ) {
3676:		$status = $mp->move( $wgUser, $reason, $createRedirect, $changeTags );
3688:	 * @param bool $auth Whether $wgUser's permissions should be checked
4451:		global $wgUser;
4455:			$user = $wgUser;

includes/upload/UploadFromUrl.php
163:		global $wgUser;
168:			&& $wgUser->isAllowed( 'upload_by_url' );

includes/upload/UploadStash.php
96:			global $wgUser;
97:			$this->user = $wgUser;

includes/user/User.php
338:	 * You should typically check this before using $wgUser or
343:	 * $user = $wgUser->isSafeToLoad() ? $wgUser : new User;
1607:		global $wgProxyWhitelist, $wgUser, $wgApplyIpBlocksToXff, $wgSoftBlockRanges;
1627:			// $wgUser->getName() only works after the end of Setup.php. Until
1629:			$globalUserName = $wgUser->isSafeToLoad()
1630:				? $wgUser->getName()
1631:				: IP::sanitizeIP( $wgUser->getRequest()->getIP() );
5187:	 *       no matter the value of $wgUser
5194:	 *       $wgUser and to 'create2' otherwise

includes/WebRequest.php
878:		global $wgUser;
885:			$limit = $wgUser->getIntOption( $optionname );

languages/classes/LanguageFi.php
87:	 * @param User $user User object to use timezone from or null for $wgUser

languages/Language.php
2094:		global $wgUser, $wgLocalTZoffset;
2097:			$tz = $wgUser->getOption( 'timecorrection' );
2174:		global $wgUser;
2178:				$datePreference = $wgUser->getDatePreference();
3977:	 * @param User $user User object to use timezone from or null for $wgUser

languages/LanguageConverter.php
162:		global $wgDefaultLanguageVariant, $wgUser;
166:		if ( $wgUser->isSafeToLoad() && $wgUser->isLoggedIn() && !$req ) {
251:		global $wgUser, $wgContLang;
263:		if ( !$wgUser->isSafeToLoad() ) {
266:		if ( $wgUser->isLoggedIn() ) {
268:				$ret = $wgUser->getOption( 'variant' );
270:				$ret = $wgUser->getOption( 'variant-' . $this->mMainLanguageCode );
275:			$ret = $wgUser->getOption( 'language' );

maintenance/cleanupSpam.php
45:		global $IP, $wgLocalDatabases, $wgUser;
48:		$wgUser = User::newSystemUser( $username );
49:		if ( !$wgUser ) {
53:		if ( !$wgUser->getId() ) {
54:			$wgUser->addToDatabase();

maintenance/deleteBatch.php
51:		global $wgUser;
70:		$wgUser = $user;

maintenance/deleteDefaultMessages.php
41:		global $wgUser;
68:		$wgUser = $user;

maintenance/deleteEqualMessages.php
169:		global $wgUser;
170:		$wgUser = $user;

maintenance/edit.php
47:		global $wgUser;
57:			$wgUser = User::newSystemUser( 'Maintenance script', [ 'steal' => true ] );
59:			$wgUser = User::newFromName( $userName );
61:		if ( !$wgUser ) {
64:		if ( $wgUser->isAnon() ) {
65:			$wgUser->addToDatabase();

maintenance/importImages.php
126:		global $wgFileExtensions, $wgUser, $wgRestrictionLevels;
158:		$wgUser = $user;
265:						$wgUser = $user;
267:						$wgUser = User::newFromName( $real_user );
268:						if ( $wgUser === false ) {
301:						" publishing {$file} by '{$wgUser->getName()}', comment '$commentText'... "

maintenance/importSiteScripts.php
42:		global $wgUser;
50:		$wgUser = $user;

maintenance/moveBatch.php
57:		global $wgUser;
79:			$wgUser = User::newSystemUser( 'Move page script', [ 'steal' => true ] );
81:			$wgUser = User::newFromName( $user );
83:		if ( !$wgUser ) {
111:			$status = $mp->move( $wgUser, $reason, !$noredirects );

maintenance/preprocessorFuzzTest.php
197:		global $wgParser, $wgUser;
199:		$wgUser = new PPFuzzUser;
200:		$wgUser->mName = 'Fuzz';
201:		$wgUser->mFrom = 'name';
202:		$wgUser->ppfz_test = $this;
204:		$options = ParserOptions::newFromUser( $wgUser );

maintenance/undelete.php
36:		global $wgUser;
47:			$wgUser = User::newSystemUser( 'Command line script', [ 'steal' => true ] );
49:			$wgUser = User::newFromName( $user );
51:		if ( !$wgUser ) {

skins/Nostalgia/Nostalgia_body.php
244:		global $wgOut, $wgUser;
251:			if ( $wgUser->isLoggedIn() ) {
285:				if ( $wgUser->isAllowed( 'delete' ) ) {
289:				if ( $wgUser->isAllowed( 'protect' ) && $title->getRestrictionTypes() ) {
293:				if ( $wgUser->isAllowed( 'move' ) ) {
374:		global $wgOut, $wgUser, $wgRequest, $wgLang;
416:		if ( $wgUser->getNewtalk() ) {
419:			if ( !$title->equals( $wgUser->getTalkPage() ) ) {
421:					$wgUser->getTalkPage(),
428:					$wgUser->getTalkPage(),
535:		global $wgUser, $wgRequest;
540:		if ( $title->getArticleID() && ( !$diff ) && $wgUser->isAllowed( 'delete' ) ) {
560:		global $wgUser, $wgRequest;
565:		if ( $title->getArticleID() && ( ! $diff ) && $wgUser->isAllowed( 'protect' ) && $title->getRestrictionTypes() ) {
591:		global $wgOut, $wgUser;
598:			if ( $wgUser->isWatched( $title ) ) {

tests/phpunit/includes/api/ApiTestCase.php
76:		global $wgRequest, $wgUser;
85:			$wgUser = $user;
90:		RequestContext::getMain()->setUser( $wgUser );
94:		$context = $this->apiContext->newTestContext( $wgRequest, $wgUser );
180:			global $wgUser;
181:			$wgUser = $testUser->getUser();
182:			RequestContext::getMain()->setUser( $wgUser );

tests/phpunit/includes/page/WikiPageTest.php
1057:		global $wgUser;
1070:				$user = $wgUser;

tests/phpunit/includes/user/UserTest.php
761:		global $wgUser;
771:		$wgUser = User::newFromSession( $request );
772:		$this->assertNull( $wgUser->getBlock() );
777:		$wgUser = User::newFromSession( $request );
778:		$block = $wgUser->getBlock();
784:		$wgUser = User::newFromSession( $request );
785:		$this->assertFalse( $wgUser->isAnon(), 'sanity check' );
786:		$this->assertNull( $wgUser->getBlock() );

tests/phpunit/languages/LanguageConverterTest.php
89:		global $wgUser;
91:		$wgUser = new User;
92:		$wgUser->load(); // from 'defaults'
93:		$wgUser->mId = 1;
94:		$wgUser->mDataLoaded = true;
95:		$wgUser->mOptionsLoaded = true;
96:		$wgUser->setOption( 'variant', 'tg-latn' );
106:		global $wgContLang, $wgUser;
109:		$wgUser = new User;
110:		$wgUser->load(); // from 'defaults'
111:		$wgUser->mId = 1;
112:		$wgUser->mDataLoaded = true;
113:		$wgUser->mOptionsLoaded = true;
114:		$wgUser->setOption( 'variant-tg', 'tg-latn' );
125:		global $wgContLang, $wgRequest, $wgUser;
129:		$wgUser = User::newFromId( "admin" );
130:		$wgUser->setId( 1 );
131:		$wgUser->mFrom = 'defaults';
132:		$wgUser->mOptionsLoaded = true;
134:		$wgUser->setOption( 'variant', 'tg-latn' );

tests/phpunit/maintenance/DumpTestCase.php
104:	 * Clears $wgUser, and reports errors from addDBData to PHPUnit

tests/phpunit/suites/UploadFromUrlTestSuite.php
19:		global $wgParser, $wgParserConf, $IP, $messageMemc, $wgMemc, $wgUser,
68:		$wgUser = new User;

Event Timeline

MaxSem created this task.Mar 1 2017, 1:23 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 1 2017, 1:23 AM

Change 340452 had a related patch set uploaded (by MaxSem):
[mediawiki/extensions/PageTriage] Get rid of global state

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

MaxSem updated the task description. (Show Details)Mar 1 2017, 1:29 AM
Paladox added a subscriber: Paladox.Mar 1 2017, 1:53 AM
Zppix moved this task from Unsorted to Needs removal on the Technical-Debt board.Mar 12 2017, 12:24 AM

Change 339825 had a related patch set uploaded (by Matěj Suchánek):
[mediawiki/extensions/WikimediaIncubator@master] Replace most Linker::link() usage with LinkRenderer

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

Change 340452 merged by jenkins-bot:
[mediawiki/extensions/PageTriage@master] Get rid of global state

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

Change 339825 merged by jenkins-bot:
[mediawiki/extensions/WikimediaIncubator@master] Replace most Linker::link() usage with LinkRenderer

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

Krinkle updated the task description. (Show Details)

Change 460332 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/Flow@master] Provide User object to AbuseFilter::filterAction

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

Change 460335 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/AbuseFilter@master] Remove some $wgUser usage

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

Krinkle added a subscriber: Krinkle.

Tentatively proposing to deprecate in MW 1.33 (which means removal no earlier than 1.34)

Change 460332 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Provide User object to AbuseFilter::filterAction

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

Change 460335 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Remove some $wgUser usage

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

Change 468808 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Send wgUser to hell

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

Tgr added a subscriber: Tgr.

We don't really have a good replacement for $wgUser right now; that will be provided by T218555: Provide access to WebRequest and associated information via a service object. There are benefits in switching to RequestContext, but it also means having to work twice.

Change 495005 had a related patch set uploaded (by Krinkle; owner: Derick Alangi):
[mediawiki/core@master] ServiceWiring: Use RequestContext instead of $wgUser global

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

Change 495005 merged by jenkins-bot:
[mediawiki/core@master] ServiceWiring: Use RequestContext instead of $wgUser global

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

Change 528442 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/Thanks@master] Replace $wgUser

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