Niharika29 has uploaded a new change for review.

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

Change subject: Popular lu_local_id and lu_global_id on new user attach
......................................................................

Popular lu_local_id and lu_global_id on new user attach

Bug: T142507
Change-Id: I36d6fb4ee95b97dada7fc80dcbe7126f42e97249
---
M includes/CentralAuthUser.php
1 file changed, 13 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/53/309553/1

diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index 37e9670..d4521fb 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -558,6 +558,16 @@
        }
 
        /**
+       * Return the local account ID
+       * @param $wikiId String
+       */
+       public function getLocalId( $wikiId ) {
+               $db = $this->getLocalDB( $wikiId );
+               $id = $db->selectField( 'user', 'user_id', array( 'user_name' 
=> $this->mName ), __METHOD__ );
+               return $id;
+       }
+
+       /**
         * Generate a valid memcached key for caching the object's data.
         * @return String
         */
@@ -1797,7 +1807,9 @@
                                'lu_wiki'               => $wikiID,
                                'lu_name'               => $this->mName,
                                'lu_attached_timestamp' => $dbw->timestamp( $ts 
),
-                               'lu_attached_method'    => $method ),
+                               'lu_attached_method'    => $method,
+                               'lu_local_id'           => $this->getLocalId(),
+                               'lu_global_id'          => $this->mGlobalId ),
                        __METHOD__,
                        array( 'IGNORE' )
                );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I36d6fb4ee95b97dada7fc80dcbe7126f42e97249
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Niharika29 <nihar...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to