Skip to content

Commit 503cc29

Browse files
authored
fix inOrg (#245)
1 parent 47ed0d3 commit 503cc29

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

resources/lib/UnityOrg.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,9 @@ public function getOrgID()
5555
return $this->orgid;
5656
}
5757

58-
public function inOrg($user)
58+
public function inOrg($user, $ignorecache = false)
5959
{
60-
$org_group = $this->getLDAPOrgGroup();
61-
$members = $org_group->getAttribute("memberuid");
62-
return in_array($user, $members);
60+
return in_array($user->getUID(), $this->getOrgMemberUIDs($ignorecache));
6361
}
6462

6563
public function getOrgMembers($ignorecache = false)

resources/lib/UnityUser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function init($send_mail = true)
107107
$orgEntry->init();
108108
}
109109

110-
if (!$orgEntry->inOrg($this->uid)) {
110+
if (!$orgEntry->inOrg($this)) {
111111
$orgEntry->addUser($this);
112112
}
113113

0 commit comments

Comments
 (0)