From 9b273e8e4976c516c9ba61af992445820e45501f Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 28 Aug 2016 12:10:14 -0700 Subject: [PATCH] Use DB_SLAVE in TemporaryPasswordPrimaryAuthenticationProvider Barring ChronologyProtector failure (which itself falls back to waitForReplication) on account creation, this should be fine. Change-Id: I94be86c8f56e9e98a9d06814b33a9f08a9228db6 --- .../TemporaryPasswordPrimaryAuthenticationProvider.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php b/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php index ed94c1ad2b..c3382847b5 100644 --- a/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php +++ b/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php @@ -126,8 +126,8 @@ class TemporaryPasswordPrimaryAuthenticationProvider return AuthenticationResponse::newAbstain(); } - $dbw = wfGetDB( DB_MASTER ); - $row = $dbw->selectRow( + $dbr = wfGetDB( DB_SLAVE ); + $row = $dbr->selectRow( 'user', [ 'user_id', 'user_newpassword', 'user_newpass_time', @@ -165,8 +165,8 @@ class TemporaryPasswordPrimaryAuthenticationProvider return false; } - $dbw = wfGetDB( DB_MASTER ); - $row = $dbw->selectRow( + $dbr = wfGetDB( DB_SLAVE ); + $row = $dbr->selectRow( 'user', [ 'user_newpassword', 'user_newpass_time' ], [ 'user_name' => $username ], -- 2.20.1