r96732 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96731‎ | r96732 | r96733 >
Date:18:46, 10 September 2011
Author:reedy
Status:reverted (Comments)
Tags:
Comment:
Invalidate user cache upon password change

Should help (maybe fix?) Bug 30850 - maintenance/changePassword.php does not purge (APC) cache
Modified paths:
  • /trunk/phase3/maintenance/changePassword.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/changePassword.php
@@ -49,6 +49,7 @@
5050 try {
5151 $user->setPassword( $this->getOption( 'password' ) );
5252 $user->saveSettings();
 53+ $user->invalidateCache();
5354 $this->output( "Password set for " . $user->getName() . "\n" );
5455 } catch ( PasswordError $pwe ) {
5556 $this->error( $pwe->getText(), true );

Sign-offs

UserFlagDate
Quisinspected18:48, 10 September 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r96733Revert r96732reedy18:51, 10 September 2011

Comments

#Comment by Quis (talk | contribs)   18:48, 10 September 2011

Shouldn't that be done inside saveSettings() somewhere?

#Comment by Reedy (talk | contribs)   18:50, 10 September 2011

Possibly, yeah

#Comment by Reedy (talk | contribs)   18:51, 10 September 2011

Actually, no, and this isn't gonna help

saveSettings updates user_touched, and then calls $this->clearSharedCache();

So is already doing this. Will revert

Status & tagging log