Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -2858,6 +2858,7 @@ |
2859 | 2859 | 'confirmemail_error', |
2860 | 2860 | 'confirmemail_subject', |
2861 | 2861 | 'confirmemail_body', |
| 2862 | + 'confirmemail_body_changed', |
2862 | 2863 | 'confirmemail_invalidated', |
2863 | 2864 | 'invalidateemail', |
2864 | 2865 | ), |
Index: trunk/phase3/includes/User.php |
— | — | @@ -2908,9 +2908,10 @@ |
2909 | 2909 | * Generate a new e-mail confirmation token and send a confirmation/invalidation |
2910 | 2910 | * mail to the user's given address. |
2911 | 2911 | * |
| 2912 | + * @param $changed Boolean: whether the adress changed |
2912 | 2913 | * @return \types{\bool,\type{WikiError}} True on success, a WikiError object on failure. |
2913 | 2914 | */ |
2914 | | - function sendConfirmationMail() { |
| 2915 | + function sendConfirmationMail( $changed = false ) { |
2915 | 2916 | global $wgLang; |
2916 | 2917 | $expiration = null; // gets passed-by-ref and defined in next line. |
2917 | 2918 | $token = $this->confirmationToken( $expiration ); |
— | — | @@ -2918,8 +2919,9 @@ |
2919 | 2920 | $invalidateURL = $this->invalidationTokenUrl( $token ); |
2920 | 2921 | $this->saveSettings(); |
2921 | 2922 | |
| 2923 | + $message = $changed ? 'confirmemail_body_changed' : 'confirmemail_body'; |
2922 | 2924 | return $this->sendMail( wfMsg( 'confirmemail_subject' ), |
2923 | | - wfMsg( 'confirmemail_body', |
| 2925 | + wfMsg( $message, |
2924 | 2926 | wfGetIP(), |
2925 | 2927 | $this->getName(), |
2926 | 2928 | $url, |
Index: trunk/phase3/includes/Preferences.php |
— | — | @@ -1272,7 +1272,7 @@ |
1273 | 1273 | if( $wgEmailAuthentication ) { |
1274 | 1274 | # Mail a temporary password to the dirty address. |
1275 | 1275 | # User can come back through the confirmation URL to re-enable email. |
1276 | | - $result = $wgUser->sendConfirmationMail(); |
| 1276 | + $result = $wgUser->sendConfirmationMail( $oldadr != '' ); |
1277 | 1277 | if( WikiError::isError( $result ) ) { |
1278 | 1278 | return wfMsg( 'mailerror', htmlspecialchars( $result->getMessage() ) ); |
1279 | 1279 | } elseif( $entryPoint == 'ui' ) { |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -3866,31 +3866,31 @@ |
3867 | 3867 | 'limitall' => 'all', |
3868 | 3868 | |
3869 | 3869 | # E-mail address confirmation |
3870 | | -'confirmemail' => 'Confirm e-mail address', |
3871 | | -'confirmemail_noemail' => 'You do not have a valid e-mail address set in your [[Special:Preferences|user preferences]].', |
3872 | | -'confirmemail_text' => '{{SITENAME}} requires that you validate your e-mail address before using e-mail features. |
| 3870 | +'confirmemail' => 'Confirm e-mail address', |
| 3871 | +'confirmemail_noemail' => 'You do not have a valid e-mail address set in your [[Special:Preferences|user preferences]].', |
| 3872 | +'confirmemail_text' => '{{SITENAME}} requires that you validate your e-mail address before using e-mail features. |
3873 | 3873 | Activate the button below to send a confirmation mail to your address. |
3874 | 3874 | The mail will include a link containing a code; |
3875 | 3875 | load the link in your browser to confirm that your e-mail address is valid.', |
3876 | | -'confirmemail_pending' => 'A confirmation code has already been e-mailed to you; |
| 3876 | +'confirmemail_pending' => 'A confirmation code has already been e-mailed to you; |
3877 | 3877 | if you recently created your account, you may wish to wait a few minutes for it to arrive before trying to request a new code.', |
3878 | | -'confirmemail_send' => 'Mail a confirmation code', |
3879 | | -'confirmemail_sent' => 'Confirmation e-mail sent.', |
3880 | | -'confirmemail_oncreate' => 'A confirmation code was sent to your e-mail address. |
| 3878 | +'confirmemail_send' => 'Mail a confirmation code', |
| 3879 | +'confirmemail_sent' => 'Confirmation e-mail sent.', |
| 3880 | +'confirmemail_oncreate' => 'A confirmation code was sent to your e-mail address. |
3881 | 3881 | This code is not required to log in, but you will need to provide it before enabling any e-mail-based features in the wiki.', |
3882 | | -'confirmemail_sendfailed' => '{{SITENAME}} could not send your confirmation mail. |
| 3882 | +'confirmemail_sendfailed' => '{{SITENAME}} could not send your confirmation mail. |
3883 | 3883 | Please check your e-mail address for invalid characters. |
3884 | 3884 | |
3885 | 3885 | Mailer returned: $1', |
3886 | | -'confirmemail_invalid' => 'Invalid confirmation code. |
| 3886 | +'confirmemail_invalid' => 'Invalid confirmation code. |
3887 | 3887 | The code may have expired.', |
3888 | | -'confirmemail_needlogin' => 'You need to $1 to confirm your e-mail address.', |
3889 | | -'confirmemail_success' => 'Your e-mail address has been confirmed. |
| 3888 | +'confirmemail_needlogin' => 'You need to $1 to confirm your e-mail address.', |
| 3889 | +'confirmemail_success' => 'Your e-mail address has been confirmed. |
3890 | 3890 | You may now [[Special:UserLogin|log in]] and enjoy the wiki.', |
3891 | | -'confirmemail_loggedin' => 'Your e-mail address has now been confirmed.', |
3892 | | -'confirmemail_error' => 'Something went wrong saving your confirmation.', |
3893 | | -'confirmemail_subject' => '{{SITENAME}} e-mail address confirmation', |
3894 | | -'confirmemail_body' => 'Someone, probably you, from IP address $1, |
| 3891 | +'confirmemail_loggedin' => 'Your e-mail address has now been confirmed.', |
| 3892 | +'confirmemail_error' => 'Something went wrong saving your confirmation.', |
| 3893 | +'confirmemail_subject' => '{{SITENAME}} e-mail address confirmation', |
| 3894 | +'confirmemail_body' => 'Someone, probably you, from IP address $1, |
3895 | 3895 | has registered an account "$2" with this e-mail address on {{SITENAME}}. |
3896 | 3896 | |
3897 | 3897 | To confirm that this account really does belong to you and activate |
— | — | @@ -3904,9 +3904,23 @@ |
3905 | 3905 | $5 |
3906 | 3906 | |
3907 | 3907 | This confirmation code will expire at $4.', |
3908 | | -'confirmemail_invalidated' => 'E-mail address confirmation canceled', |
3909 | | -'invalidateemail' => 'Cancel e-mail confirmation', |
| 3908 | +'confirmemail_body_changed' => 'Someone, probably you, from IP address $1, |
| 3909 | +has changed the e-mail address of the account "$2" to this address on {{SITENAME}}. |
3910 | 3910 | |
| 3911 | +To confirm that this account really does belong to you and reactivate |
| 3912 | +e-mail features on {{SITENAME}}, open this link in your browser: |
| 3913 | + |
| 3914 | +$3 |
| 3915 | + |
| 3916 | +If the account does *not* belong to you, follow this link |
| 3917 | +to cancel the e-mail address confirmation: |
| 3918 | + |
| 3919 | +$5 |
| 3920 | + |
| 3921 | +This confirmation code will expire at $4.', |
| 3922 | +'confirmemail_invalidated' => 'E-mail address confirmation canceled', |
| 3923 | +'invalidateemail' => 'Cancel e-mail confirmation', |
| 3924 | + |
3911 | 3925 | # Scary transclusion |
3912 | 3926 | 'scarytranscludedisabled' => '[Interwiki transcluding is disabled]', |
3913 | 3927 | 'scarytranscludefailed' => '[Template fetch failed for $1]', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -27,6 +27,8 @@ |
28 | 28 | throws an error |
29 | 29 | * (bugs 22665 and 22667) User '0' can now be unblocked and have its block |
30 | 30 | settings changed |
| 31 | +* (bug 22606) The body of e-mail address confirmation message is now different |
| 32 | + when the address changed |
31 | 33 | |
32 | 34 | == API changes in 1.17 == |
33 | 35 | |