LDAP for Laurentian tweak
authorDan Scott <dan@coffeecode.net>
Mon, 17 Jul 2017 05:39:56 +0000 (01:39 -0400)
committerDan Scott <dan@coffeecode.net>
Mon, 17 Jul 2017 05:39:56 +0000 (01:39 -0400)
Signed-off-by: Dan Scott <dan@coffeecode.net>
Open-ILS/src/perlmods/lib/OpenILS/Application/AuthProxy/LDAP_Auth_OSUL.pm

index 4ddd676..1a904ec 100644 (file)
@@ -50,9 +50,9 @@ sub authenticate {
         if ( $ldap->bind( $authid, password => $authid_pass )->code == 0 ) {
             $reached_ldap = 1;
             # verify username
-            if ( $ldap
-                ->search( base => $basedn, filter => "($id_attr=$ldap_username)" )
-                ->count != 0 ) {
+            my $ldap_search = $ldap->search( base => $basedn,
+                                             filter => "($id_attr=$ldap_username)" );
+            if ( $ldap_search->count != 0 ) {
                 $user_in_ldap = 1;
 
                 # verify password (bind check)