Index: trunk/phase3/includes/specials/SpecialChangeEmail.php |
— | — | @@ -31,10 +31,16 @@ |
32 | 32 | parent::__construct( 'ChangeEmail' ); |
33 | 33 | } |
34 | 34 | |
| 35 | + function isListed() { |
| 36 | + global $wgAuth; |
| 37 | + return $wgAuth->allowPropChange( 'emailaddress' ); |
| 38 | + } |
| 39 | + |
35 | 40 | /** |
36 | 41 | * Main execution point |
37 | 42 | */ |
38 | 43 | function execute( $par ) { |
| 44 | + global $wgAuth; |
39 | 45 | if ( wfReadOnly() ) { |
40 | 46 | throw new ReadOnlyError; |
41 | 47 | } |
— | — | @@ -51,6 +57,11 @@ |
52 | 58 | |
53 | 59 | $user = $this->getUser(); |
54 | 60 | |
| 61 | + if ( !$wgAuth->allowPropChange( 'emailaddress' ) ) { |
| 62 | + $this->error( wfMsgExt( 'cannotchangeemail', 'parseinline' ) ); |
| 63 | + return; |
| 64 | + } |
| 65 | + |
55 | 66 | if ( !$request->wasPosted() && !$user->isLoggedIn() ) { |
56 | 67 | $this->error( wfMsg( 'changeemail-no-info' ) ); |
57 | 68 | return; |
Index: trunk/phase3/includes/Preferences.php |
— | — | @@ -1424,6 +1424,7 @@ |
1425 | 1425 | /* |
1426 | 1426 | * Try to set a user's email address. |
1427 | 1427 | * This does *not* try to validate the address. |
| 1428 | + * Caller is responsible for checking $wgAuth. |
1428 | 1429 | * @param $user User |
1429 | 1430 | * @param $newaddr string New email address |
1430 | 1431 | * @return Array (true on success or Status on failure, info string) |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1126,6 +1126,7 @@ |
1127 | 1127 | 'emailconfirmlink' => 'Confirm your e-mail address', |
1128 | 1128 | 'invalidemailaddress' => 'The e-mail address cannot be accepted as it appears to have an invalid format. |
1129 | 1129 | Please enter a well-formatted address or empty that field.', |
| 1130 | +'cannotchangeemail' => 'Account e-mail addresses cannot be changed on this wiki.', |
1130 | 1131 | 'accountcreated' => 'Account created', |
1131 | 1132 | 'accountcreatedtext' => 'The user account for $1 has been created.', |
1132 | 1133 | 'createaccount-title' => 'Account creation for {{SITENAME}}', |