r76676 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76675‎ | r76676 | r76677 >
Date:22:16, 14 November 2010
Author:demon
Status:reverted (Comments)
Tags:
Comment:
Only invalidate the user cache if the e-mail address actually changed. First half of bug 23339? I don't have CA setup here locally, needs review
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuthPlugin.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/CentralAuthPlugin.php
@@ -109,7 +109,9 @@
110110 */
111111 function updateUser( &$user ) {
112112 $central = CentralAuthUser::getInstance( $user );
113 - if ( $central->exists() && $central->isAttached() ) {
 113+ if ( $central->exists() && $central->isAttached() &&
 114+ $central->getEmail() != $user->getEmail() )
 115+ {
114116 $user->setEmail( $central->getEmail() );
115117 $user->mEmailAuthenticated = $central->getEmailAuthenticationTimestamp();
116118 $user->saveSettings();

Follow-up revisions

RevisionCommit summaryAuthorDate
r80184Revert r76676: per IRC with Brion, this might not be complete, should skip de...demon19:04, 13 January 2011

Comments

#Comment by 😂 (talk | contribs)   19:08, 13 January 2011

Reverted in REL1_17. Per discussion with Brion:

<brion> ^demon: offhand; does this need to trigger when a previously unvalidated email address becomes validated?
<brion> the inside of that if seems to do two things, but only one is checked for with the $central->getEmail() != $user->getEmail()

Status & tagging log