summaryrefslogtreecommitdiff
path: root/inc/adLDAP.php
diff options
context:
space:
mode:
authorDominik Eckelmann <deckelmann@gmail.com>2012-03-14 12:52:36 +0100
committerDominik Eckelmann <deckelmann@gmail.com>2012-03-14 12:52:36 +0100
commit3a6d76070be7220b8e5f7c04443aa923bc8cddf2 (patch)
treedfd00b5d0c5f58ee313eb376a8cb1ee99512bf83 /inc/adLDAP.php
parent03d7247e047c21d2733f837148a1499f56784ae3 (diff)
parentd0caa5642f6e322a026bd5bdac4585ff1b2f40da (diff)
downloadrpg-3a6d76070be7220b8e5f7c04443aa923bc8cddf2.tar.gz
rpg-3a6d76070be7220b8e5f7c04443aa923bc8cddf2.tar.bz2
Merge branch 'master' of https://github.com/splitbrain/dokuwiki
Conflicts: lib/exe/xmlrpc.php
Diffstat (limited to 'inc/adLDAP.php')
-rw-r--r--inc/adLDAP.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/inc/adLDAP.php b/inc/adLDAP.php
index a64096b85..24be6e475 100644
--- a/inc/adLDAP.php
+++ b/inc/adLDAP.php
@@ -1021,6 +1021,26 @@ class adLDAP {
}
/**
+ * Return info about the domain itself
+ *
+ * @authot Andreas Gohr <gohr@cosmocode.de>
+ * @param array $fields The fields to query
+ * @return array
+ */
+ public function domain_info($fields){
+ if (!$this->_bind){ return (false); }
+
+ $sr = ldap_read($this->_conn, $this->_base_dn, 'objectclass=*', $fields);
+ if (!$sr) {
+ return false;
+ }
+ $info = ldap_get_entries($this->_conn, $sr);
+ if(count($info)) return $info[0];
+
+ return false;
+ }
+
+ /**
* Determine a user's password expiry date
*
* @param string $username The username to query