diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index 6b185290c30e5f1311af30124874922a06ba5d22..1525896849f923b3bf6a2a8826f0d7599c81c988 100644
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
@@ -310,6 +310,7 @@ class LDAP
     if ($this->hascon) {
       @ldap_close($this->cid);
       $this->hascon = FALSE;
+      $this->cid    = FALSE;
     }
     logging::debug(DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__, '', 'disconnect');
   }