From a83f5fbeae60d24312cd7b20ce07755a84b6c38f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 20 Dec 2006 09:09:50 +0000 Subject: [PATCH] * (bug 8333) Fix quick user data update on login password change on replication database setups. User data is now pulled from master instead of slave in User::loadFromDatabase, ensuring that it is fresh and accurate when read and then saved back into cache. This was breaking with the Special:Rename operation which automatically logs the user in with the new password after changing it; pulling from slave meant the record was often not the updated one. --- RELEASE-NOTES | 9 ++++++++- includes/User.php | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e3f5a6259b..ba81800d6f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -355,7 +355,14 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Fix regression in thumb styles; size and padding didn't match with new arrangement. * (bug 8326) Fix regression in thumb styles of cached content - +* (bug 8333) Fix quick user data update on login password change on + replication database setups. User data is now pulled from master + instead of slave in User::loadFromDatabase, ensuring that it is + fresh and accurate when read and then saved back into cache. + This was breaking with the Special:Rename operation which + automatically logs the user in with the new password after changing + it; pulling from slave meant the record was often not the updated + one. == Languages updated == diff --git a/includes/User.php b/includes/User.php index 0dacab26dd..ae92160db0 100644 --- a/includes/User.php +++ b/includes/User.php @@ -697,7 +697,7 @@ class User { return false; } - $dbr =& wfGetDB( DB_SLAVE ); + $dbr =& wfGetDB( DB_MASTER ); $s = $dbr->selectRow( 'user', '*', array( 'user_id' => $this->mId ), __METHOD__ ); if ( $s !== false ) { -- 2.20.1