Nikerabbit has uploaded a new change for review.

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

Change subject: Fix logic in GlobalUser::newFromId when CentralAuth not 
installed
......................................................................

Fix logic in GlobalUser::newFromId when CentralAuth not installed

Change-Id: If0e634870942b255b64cba6fbf2fd519105990c3
---
M includes/GlobalUser.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/21/196221/1

diff --git a/includes/GlobalUser.php b/includes/GlobalUser.php
index 42cea19..1192b7b 100644
--- a/includes/GlobalUser.php
+++ b/includes/GlobalUser.php
@@ -28,11 +28,11 @@
         * @return GlobalUser
         */
        public static function newFromId( $id ) {
-               $user = null;
-
                // Use CentralAuth if available. Use local user to ease testing.
                if ( class_exists( '\CentralAuthUser' ) ) {
                        $user = \CentralAuthUser::newFromId( $id );
+               } else {
+                       $user = \User::newFromId( $id );
                }
 
                if ( $user === null ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/196221
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0e634870942b255b64cba6fbf2fd519105990c3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to