From 66aeba24c36f3d95b5c47c0930b40073b99a0b6a Mon Sep 17 00:00:00 2001
From: Jarek Polok <Jaroslaw.Polok@cern.ch>
Date: Wed, 24 Oct 2018 16:27:33 +0200
Subject: [PATCH] dont die on empty result

---
 VERSION             | 2 +-
 src/modules/ldap.pm | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/VERSION b/VERSION
index 6049e7a..a3348b8 100644
--- a/VERSION
+++ b/VERSION
@@ -1,4 +1,4 @@
 PACKAGE=aims2
 EMAIL=Linux.Support@cern.ch
-VERSION=2.22
+VERSION=2.23
 RELEASE=1
diff --git a/src/modules/ldap.pm b/src/modules/ldap.pm
index 729f0c2..61fae19 100644
--- a/src/modules/ldap.pm
+++ b/src/modules/ldap.pm
@@ -72,10 +72,6 @@ sub ldap_search
 
    # search the tree.
    my $result = $ldap->search( base => "$base",  scope => "sub", filter => "$filter" ); # todo: fix for 7 !, attrs =>$attrs );
-   unless($result->count > 0){
-      die "Error: LDAP failed to return user information (while searching for: $filter) \n"; 
-#      # die "Error: LDAP failed to return user information.\n"
-   }   
 
    # 'pointer' to entry
    return $result;
-- 
GitLab