- # The current password field is never required; it's possible
- # that existing users might have empty passwords on any wiki.
- # The two other password fields are required if
- # $wgMinimalPasswordLength > 0 (not allowed to set an empty
- # password).
- if ( ( $name == 'wpNewPassword' || $name == 'wpRetype' )
- && $wgMinimalPasswordLength > 0 ) {
- $attribs[] = 'required';
+ if ( $name == 'wpNewPassword' || $name == 'wpRetype' ) {
+ $attribs = array_merge( $attribs,
+ User::passwordChangeInputAttribs() );