summaryrefslogtreecommitdiffstats
path: root/lib/Auth/LDAP.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Auth/LDAP.php')
-rw-r--r--lib/Auth/LDAP.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index 1801328..a75323d 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -249,6 +249,19 @@ class LDAP
console($result);
}
+ public function get_attributes($subject_dn, $attributes)
+ {
+ $result = $this->search($subject_dn, '(objectclass=*)', $attributes);
+ $result = self::normalize_result($result);
+
+ if (!empty($result)) {
+ $result = array_pop($result);
+ return $result;
+ }
+
+ return false;
+ }
+
public function group_find_by_attribute($attribute)
{
if (empty($attribute) || !is_array($attribute) || count($attribute) > 1) {
@@ -455,19 +468,6 @@ class LDAP
*
*
*/
- public function user_attributes($user_dn, $attributes)
- {
- $result = $this->search($user_dn, '(objectclass=*)', $attributes);
- $result = self::normalize_result($result);
-
- if (!empty($result)) {
- $result = array_pop($result);
- return $result;
- }
-
- return false;
- }
-
public function user_info($user)
{
$is_dn = ldap_explode_dn($user, 1);