[MediaWiki-commits] [Gerrit] Modifying CentralAuthUser-attemptAutoMigration to allow for... - change (mediawiki...CentralAuth)
Pgehres has uploaded a new change for review. https://gerrit.wikimedia.org/r/63011 Change subject: Modifying CentralAuthUser-attemptAutoMigration to allow for home wiki specification. .. Modifying CentralAuthUser-attemptAutoMigration to allow for home wiki specification. Checks to see if mHomeWiki is set and, if so, does not determine the home wiki using chooseHomeWiki(). This allows us to set the home wiki in migrateAccount before running attemptAutoMigration ensuring that the correct account wins. Change-Id: Ib9364e7a49e3f17f4ca63118b2234d340e862d67 --- M CentralAuthUser.php 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/11/63011/1 diff --git a/CentralAuthUser.php b/CentralAuthUser.php index 93c1294..204fff1 100644 --- a/CentralAuthUser.php +++ b/CentralAuthUser.php @@ -796,8 +796,16 @@ return false; } + if ( isset( $this-mHomeWiki ) ) { + if ( !array_key_exists( $this-mHomeWiki, $migrationSet ) ) { + wfDebugLog( 'CentralAuth', + Invalid home wiki specification '$this-mName'@'$this-mHomeWiki' ); + return false; + } + } else { + $this-mHomeWiki = $this-chooseHomeWiki( $migrationSet ); + } - $this-mHomeWiki = $this-chooseHomeWiki( $migrationSet ); $home = $migrationSet[$this-mHomeWiki]; $this-mEmail = $home['email']; $this-mEmailAuthenticated = $home['emailAuthenticated']; -- To view, visit https://gerrit.wikimedia.org/r/63011 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9364e7a49e3f17f4ca63118b2234d340e862d67 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Pgehres pgeh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Modifying CentralAuthUser-attemptAutoMigration to allow for... - change (mediawiki...CentralAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Modifying CentralAuthUser-attemptAutoMigration to allow for home wiki specification. .. Modifying CentralAuthUser-attemptAutoMigration to allow for home wiki specification. Checks to see if mHomeWiki is set and, if so, does not determine the home wiki using chooseHomeWiki(). This allows us to set the home wiki in migrateAccount before running attemptAutoMigration ensuring that the correct account wins. Change-Id: Ib9364e7a49e3f17f4ca63118b2234d340e862d67 --- M CentralAuthUser.php 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: CSteipp: Looks good to me, approved jenkins-bot: Verified diff --git a/CentralAuthUser.php b/CentralAuthUser.php index 93c1294..204fff1 100644 --- a/CentralAuthUser.php +++ b/CentralAuthUser.php @@ -796,8 +796,16 @@ return false; } + if ( isset( $this-mHomeWiki ) ) { + if ( !array_key_exists( $this-mHomeWiki, $migrationSet ) ) { + wfDebugLog( 'CentralAuth', + Invalid home wiki specification '$this-mName'@'$this-mHomeWiki' ); + return false; + } + } else { + $this-mHomeWiki = $this-chooseHomeWiki( $migrationSet ); + } - $this-mHomeWiki = $this-chooseHomeWiki( $migrationSet ); $home = $migrationSet[$this-mHomeWiki]; $this-mEmail = $home['email']; $this-mEmailAuthenticated = $home['emailAuthenticated']; -- To view, visit https://gerrit.wikimedia.org/r/63011 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib9364e7a49e3f17f4ca63118b2234d340e862d67 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Pgehres pgeh...@wikimedia.org Gerrit-Reviewer: CSteipp cste...@wikimedia.org Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Pgehres pgeh...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits