Unsetting the email address for a user when the email address is invalidated.
authorPeter Gehres <pgehres@wikimedia.org>
Wed, 1 May 2013 22:17:02 +0000 (15:17 -0700)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 14 May 2013 06:27:24 +0000 (08:27 +0200)
Change-Id: I2a8445745f04540e7962695c3116bb247d81fd94

includes/User.php

index d114b99..1312104 100644 (file)
@@ -2191,8 +2191,8 @@ class User {
                if ( $str == $this->mEmail ) {
                        return;
                }
-               $this->mEmail = $str;
                $this->invalidateEmail();
+               $this->mEmail = $str;
                wfRunHooks( 'UserSetEmail', array( $this, &$this->mEmail ) );
        }
 
@@ -3748,6 +3748,7 @@ class User {
                $this->mEmailToken = null;
                $this->mEmailTokenExpires = null;
                $this->setEmailAuthenticationTimestamp( null );
+               $this->mEmail = '';
                wfRunHooks( 'InvalidateEmailComplete', array( $this ) );
                return true;
        }