summaryrefslogtreecommitdiff
path: root/inc/adLDAP.php
diff options
context:
space:
mode:
authorGuy Brand <gb@unistra.fr>2012-09-10 17:04:45 +0200
committerGuy Brand <gb@unistra.fr>2012-09-10 17:04:45 +0200
commit0f8ac4e8c5872a6b68b350f96a9ecde0291edefa (patch)
treead7938bb4143d5e5a38fd7a8d131e4171aec657d /inc/adLDAP.php
parent58ec8fa9128e4581749955de87530f432e387588 (diff)
parentb31fcef02fd24b3e746c9618e77152c7b84c2f2a (diff)
downloadrpg-0f8ac4e8c5872a6b68b350f96a9ecde0291edefa.tar.gz
rpg-0f8ac4e8c5872a6b68b350f96a9ecde0291edefa.tar.bz2
Merge branch 'master' into stable
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