From 4eee212883b34e1ca7cfb9466580ff20dca5c979 Mon Sep 17 00:00:00 2001
From: JohnDoh <roundcube@tehinterweb.co.uk>
Date: Sat, 16 Aug 2014 02:05:30 -0400
Subject: [PATCH] add include_plugin function for optoinal plugins
---
program/lib/Net/LDAP3/Result.php | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/program/lib/Net/LDAP3/Result.php b/program/lib/Net/LDAP3/Result.php
index 728b304..0759df0 100644
--- a/program/lib/Net/LDAP3/Result.php
+++ b/program/lib/Net/LDAP3/Result.php
@@ -71,7 +71,7 @@
}
/**
- *
+ * Wrapper for ldap_sort()
*/
public function sort($attr)
{
@@ -79,18 +79,23 @@
}
/**
- *
+ * Get entries count
*/
public function count()
{
- if (!isset($this->count))
+ if (!isset($this->count)) {
$this->count = ldap_count_entries($this->conn, $this->result);
+ }
return $this->count;
}
/**
+ * Wrapper for ldap_get_entries()
*
+ * @param bool $normalize Optionally normalize the entries to a list of hash arrays
+ *
+ * @return array List of LDAP entries
*/
public function entries($normalize = false)
{
@@ -103,6 +108,14 @@
return $entries;
}
+ /**
+ * Wrapper for ldap_get_dn() using the current entry pointer
+ */
+ public function get_dn()
+ {
+ return $this->current ? ldap_get_dn($this->conn, $this->current) : null;
+ }
+
/*** Implement PHP 5 Iterator interface to make foreach work ***/
--
Gitblit v1.9.1