From: Brion Vibber Date: Wed, 20 Dec 2006 09:09:50 +0000 (+0000) Subject: * (bug 8333) Fix quick user data update on login password change on X-Git-Tag: 1.31.0-rc.0~54833 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=a83f5fbeae60d24312cd7b20ce07755a84b6c38f;p=lhc%2Fweb%2Fwiklou.git * (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. --- 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 ) {