Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php |
— | — | @@ -1156,7 +1156,7 @@ |
1157 | 1157 | $key = wfMemcKey( 'ldapauthentication', 'canonicalname', $username ); |
1158 | 1158 | $canonicalname = $username; |
1159 | 1159 | if ( $username != '' ) { |
1160 | | - $this->printDebug( "Username isn't empty.", NONSENSITIVE ); |
| 1160 | + $this->printDebug( "Username is: $username", NONSENSITIVE ); |
1161 | 1161 | if ( $this->getConf( 'LowercaseUsernameScheme' ) ) { |
1162 | 1162 | $canonicalname = strtolower( $canonicalname ); |
1163 | 1163 | } else { |
— | — | @@ -1169,7 +1169,7 @@ |
1170 | 1170 | return $userInfo["canonicalname"]; |
1171 | 1171 | } |
1172 | 1172 | } else { |
1173 | | - if ( $this->connect() ) { |
| 1173 | + if ( $this->validDomain( $this->getSessionDomain() ) && $this->connect() ) { |
1174 | 1174 | // Try to pull the username from LDAP. In the case of straight binds, |
1175 | 1175 | // try to fetch the username by search before bind. |
1176 | 1176 | $this->userdn = $this->getUserDN( $username, true ); |