summaryrefslogtreecommitdiff
path: root/inc/adLDAP.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-03-10 16:24:48 +0100
committerAndreas Gohr <andi@splitbrain.org>2012-03-10 16:24:48 +0100
commitc9f847f625f0f4094fe46392a06e4f4169f7d44c (patch)
tree340adc99aa6ac48603b6019b27058932019d06d2 /inc/adLDAP.php
parent70f8c497b285679b9e4450e496b717ccc409af03 (diff)
parent1e5105f90f56d0f57111eff37a535480115920c5 (diff)
downloadrpg-c9f847f625f0f4094fe46392a06e4f4169f7d44c.tar.gz
rpg-c9f847f625f0f4094fe46392a06e4f4169f7d44c.tar.bz2
Merge branch 'adexpirywarn'
* adexpirywarn: make sure AD pass expiry message is never shown twice do not hardcode profile link in AD pass expire message translatable AD expiry warning and link to update profile page Don't return any data for non-existant users do not query AD for empty user name always check expire time when configured Check password expiry times in Active Directory backend
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