diff --git a/resources/lib/UnityLDAP.php b/resources/lib/UnityLDAP.php index b7ef7cab..896ff902 100644 --- a/resources/lib/UnityLDAP.php +++ b/resources/lib/UnityLDAP.php @@ -27,14 +27,14 @@ class UnityLDAP extends ldapConn // string vars for OUs private $STR_USEROU; - private $STR_GROUPOU; + private $STR_USERGROUPOU; private $STR_PIGROUPOU; private $STR_ORGGROUPOU; private $STR_ADMINGROUP; // Instance vars for various ldapEntry objects private $userOU; - private $groupOU; + private $user_groupOU; private $pi_groupOU; private $org_groupOU; private $adminGroup; @@ -59,14 +59,14 @@ public function __construct( parent::__construct($host, $dn, $pass); $this->STR_USEROU = $user_ou; - $this->STR_GROUPOU = $group_ou; + $this->STR_USERGROUPOU = $group_ou; $this->STR_PIGROUPOU = $pigroup_ou; $this->STR_ORGGROUPOU = $orggroup_ou; $this->STR_ADMINGROUP = $admin_group; // Get Global Entries $this->userOU = $this->getEntry($user_ou); - $this->groupOU = $this->getEntry($group_ou); + $this->user_groupOU = $this->getEntry($group_ou); $this->pi_groupOU = $this->getEntry($pigroup_ou); $this->org_groupOU = $this->getEntry($orggroup_ou); $this->adminGroup = $this->getEntry($admin_group); @@ -85,9 +85,9 @@ public function getUserOU() return $this->userOU; } - public function getGroupOU() + public function getUserGroupOU() { - return $this->groupOU; + return $this->user_groupOU; } public function getPIGroupOU() @@ -186,7 +186,7 @@ private function PIGIDNumInUse($id) private function GIDNumInUse($id) { - $groups = $this->groupOU->getChildrenArray(true); + $groups = $this->user_groupOU->getChildrenArray(true); foreach ($groups as $group) { if ($group["gidnumber"][0] == $id) { return true; @@ -322,10 +322,10 @@ public function getUserEntry($uid) return $this->getEntry(unityLDAP::RDN . "=$uid," . $this->STR_USEROU); } - public function getGroupEntry($gid) + public function getUserGroupEntry($gid) { $gid = ldap_escape($gid, LDAP_ESCAPE_DN); - return $this->getEntry(unityLDAP::RDN . "=$gid," . $this->STR_GROUPOU); + return $this->getEntry(unityLDAP::RDN . "=$gid," . $this->STR_USERGROUPOU); } public function getPIGroupEntry($gid) diff --git a/resources/lib/UnityUser.php b/resources/lib/UnityUser.php index 4172ef41..cf2e4905 100644 --- a/resources/lib/UnityUser.php +++ b/resources/lib/UnityUser.php @@ -152,7 +152,7 @@ public function getLDAPUser() */ public function getLDAPGroup() { - return $this->LDAP->getGroupEntry($this->uid); + return $this->LDAP->getUserGroupEntry($this->uid); } public function exists()