r85139 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85138‎ | r85139 | r85140 >
Date:17:57, 1 April 2011
Author:laner
Status:deferred
Tags:
Comment:
More reliable entry checking. Patch by Martin Kuba.
Modified paths:
  • /trunk/extensions/LdapAuthentication/LdapAuthentication.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php
@@ -1068,7 +1068,7 @@
10691069 $this->printDebug( "Using base: $base", SENSITIVE );
10701070
10711071 $entry = @ldap_search( $this->ldapconn, $base, $filter, $attributes );
1072 - if ( !$entry ) {
 1072+ if ( @ldap_count_entries($this->ldapconn,$entry)==0 ) {
10731073 $this->printDebug( "Couldn't find an entry", NONSENSITIVE );
10741074 $this->fetchedUserInfo = false;
10751075 return '';

Status & tagging log