global $wgEnableEmail, $wgEnableUserEmail, $wgEmailAuthentication;
+ $disableEmailPrefs = false;
+
if ( $wgEmailAuthentication ) {
if ( $user->getEmail() ) {
if( $user->getEmailAuthenticationTimestamp() ) {
wfMsg( 'emailconfirmlink' ) ) . '<br />';
}
} else {
+ $disableEmailPrefs = true;
$emailauthenticated = wfMsg( 'noemailprefs' );
}
'invert' => true,
'section' => 'personal/email',
'label-message' => 'allowemail',
+ 'disabled' => $disableEmailPrefs,
);
$defaultPreferences['ccmeonemails'] =
array(
'type' => 'toggle',
'section' => 'personal/email',
'label-message' => 'tog-ccmeonemails',
+ 'disabled' => $disableEmailPrefs,
);
}
'type' => 'toggle',
'section' => 'personal/email',
'label-message' => 'tog-enotifwatchlistpages',
+ 'disabled' => $disableEmailPrefs,
);
$defaultPreferences['enotifusertalkpages'] =
array(
'type' => 'toggle',
'section' => 'personal/email',
'label-message' => 'tog-enotifusertalkpages',
+ 'disabled' => $disableEmailPrefs,
);
$defaultPreferences['enotifminoredits'] =
array(
'type' => 'toggle',
'section' => 'personal/email',
'label-message' => 'tog-enotifminoredits',
+ 'disabled' => $disableEmailPrefs,
);
$defaultPreferences['enotifrevealaddr'] =
array(
'type' => 'toggle',
'section' => 'personal/email',
- 'label-message' => 'tog-enotifrevealaddr'
+ 'label-message' => 'tog-enotifrevealaddr',
+ 'disabled' => $disableEmailPrefs,
);
}
}