summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Net/LDAP3.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php
index 2ea7833..968eddc 100644
--- a/lib/Net/LDAP3.php
+++ b/lib/Net/LDAP3.php
@@ -1899,11 +1899,16 @@ class Net_LDAP3
private function supported_controls()
{
+ if (!empty($this->supported_controls)) {
+ return $this->supported_controls;
+ }
+
$this->_info("Obtaining supported controls");
$this->return_attributes = Array("supportedcontrol");
$result = $this->search("", "(objectclass=*)", 'base');
$result = $result->entries(TRUE);
$this->_info("Obtained " . count($result['']['supportedcontrol']) . " supported controls");
+ $this->supported_controls = $result['']['supportedcontrol'];
return $result['']['supportedcontrol'];
}