Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -176,6 +176,8 @@ |
177 | 177 | * (bug 31212) History tab not collapsed when the screen is narrow |
178 | 178 | * (bug 15521) Use new section summary when the action of adding a new section |
179 | 179 | also happens to create the page |
| 180 | +* (bug 32960) remove EmailAuthenticationTimestamp from database when a |
| 181 | + email address is removed |
180 | 182 | |
181 | 183 | === API changes in 1.19 === |
182 | 184 | * (bug 19838) siprop=interwikimap can now use the interwiki cache. |
Index: trunk/phase3/includes/Preferences.php |
— | — | @@ -1428,8 +1428,6 @@ |
1429 | 1429 | # The user has supplied a new email address on the login page |
1430 | 1430 | # new behaviour: set this new emailaddr from login-page into user database record |
1431 | 1431 | $user->setEmail( $newaddr ); |
1432 | | - # But flag as "dirty" = unauthenticated |
1433 | | - $user->invalidateEmail(); |
1434 | 1432 | if ( $wgEmailAuthentication ) { |
1435 | 1433 | # Mail a temporary password to the dirty address. |
1436 | 1434 | # User can come back through the confirmation URL to re-enable email. |
— | — | @@ -1440,7 +1438,7 @@ |
1441 | 1439 | } |
1442 | 1440 | $info = 'eauth'; |
1443 | 1441 | } |
1444 | | - } else { |
| 1442 | + } elseif ( $newaddr != $oldaddr ) { // if the address is the same, don't change it |
1445 | 1443 | $user->setEmail( $newaddr ); |
1446 | 1444 | } |
1447 | 1445 | if ( $oldaddr != $newaddr ) { |
— | — | @@ -1474,7 +1472,7 @@ |
1475 | 1473 | class PreferencesForm extends HTMLForm { |
1476 | 1474 | // Override default value from HTMLForm |
1477 | 1475 | protected $mSubSectionBeforeFields = false; |
1478 | | - |
| 1476 | + |
1479 | 1477 | private $modifiedUser; |
1480 | 1478 | |
1481 | 1479 | public function setModifiedUser( $user ) { |
— | — | @@ -1553,7 +1551,7 @@ |
1554 | 1552 | function getBody() { |
1555 | 1553 | return $this->displaySection( $this->mFieldTree, '', 'mw-prefsection-' ); |
1556 | 1554 | } |
1557 | | - |
| 1555 | + |
1558 | 1556 | /** |
1559 | 1557 | * Get the <legend> for a given section key. Normally this is the |
1560 | 1558 | * prefs-$key message but we'll allow extensions to override it. |
Index: trunk/phase3/includes/User.php |
— | — | @@ -2110,7 +2110,11 @@ |
2111 | 2111 | */ |
2112 | 2112 | public function setEmail( $str ) { |
2113 | 2113 | $this->load(); |
| 2114 | + if( $str == $this->mEmail ) { |
| 2115 | + return; |
| 2116 | + } |
2114 | 2117 | $this->mEmail = $str; |
| 2118 | + $this->invalidateEmail(); |
2115 | 2119 | wfRunHooks( 'UserSetEmail', array( $this, &$this->mEmail ) ); |
2116 | 2120 | } |
2117 | 2121 | |