-
- // Password needs to be long enough
- if( strlen( $password ) < $wgMinimalPasswordLength ) {
- return 'passwordtooshort';
- } elseif( $wgContLang->lc( $password ) == $wgContLang->lc( $this->mName ) ) {
- return 'password-name-match';
- } else {
+
+ if ( $result === false ) {
+ if( strlen( $password ) < $wgMinimalPasswordLength ) {
+ return 'passwordtooshort';
+ } elseif ( $wgContLang->lc( $password ) == $wgContLang->lc( $this->mName ) ) {
+ return 'password-name-match';
+ } else {
+ //it seems weird returning true here, but this is because of the
+ //initialization of $result to false above. If the hook is never run or it
+ //doesn't modify $result, then we will likely get down into this if with
+ //a valid password.
+ return true;
+ }
+ } elseif( $result === true ) {