'NewEmail' => array(
'type' => 'email',
'label-message' => 'changeemail-newemail',
+ 'autofocus' => true
),
);
if ( $this->getConfig()->get( 'RequirePasswordforEmailChange' ) ) {
$fields['Password'] = array(
'type' => 'password',
- 'label-message' => 'changeemail-password',
- 'autofocus' => true,
+ 'label-message' => 'changeemail-password'
);
}
}
protected function getDisplayFormat() {
- return 'vform';
+ return 'ooui';
}
protected function alterForm( HTMLForm $form ) {
return Status::newFatal( 'invalidemailaddress' );
}
+ if ( $newaddr === $user->getEmail() ) {
+ return Status::newFatal( 'changeemail-nochange' );
+ }
+
$throttleCount = LoginForm::incLoginThrottle( $user->getName() );
if ( $throttleCount === true ) {
$lang = $this->getLanguage();