(bug 10250) New password submission oddness for empty passwords
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 6 Oct 2008 23:57:05 +0000 (23:57 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 6 Oct 2008 23:57:05 +0000 (23:57 +0000)
includes/specials/SpecialPreferences.php

index ca1e3d3..ea98e00 100644 (file)
@@ -135,7 +135,7 @@ class PreferencesForm {
                global $wgAuth, $wgEmailConfirmToEdit;
 
 
-               if ( '' != $this->mNewpass && $wgAuth->allowPasswordChange() ) {
+               if ( ($this->mNewpass !== '' || $this->mOldpass !== '' ) && $wgAuth->allowPasswordChange() ) {
                        if ( $this->mNewpass != $this->mRetypePass ) {
                                wfRunHooks( 'PrefsPasswordAudit', array( $wgUser, $this->mNewpass, 'badretype' ) );
                                $this->mainPrefsForm( 'error', wfMsg( 'badretype' ) );