* (bug 8333) Fix quick user data update on login password change on
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 20 Dec 2006 09:09:50 +0000 (09:09 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 20 Dec 2006 09:09:50 +0000 (09:09 +0000)
  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
includes/User.php

index e3f5a62..ba81800 100644 (file)
@@ -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 ==
 
index 0dacab2..ae92160 100644 (file)
@@ -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 ) {