mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-23 11:21:42 +02:00
This one seems to correctly update the memberuid field
This commit is contained in:
parent
abe6bfb5d7
commit
ed19a7d7cd
@ -293,11 +293,17 @@
|
|||||||
if ($this->data["account_type"] == "g" && $phpgw_info["server"]["ldap_group_context"] )
|
if ($this->data["account_type"] == "g" && $phpgw_info["server"]["ldap_group_context"] )
|
||||||
{
|
{
|
||||||
$members = $this->members($this->data["account_id"]);
|
$members = $this->members($this->data["account_id"]);
|
||||||
$entry["memberuid"] = "";
|
$entry["memberuid"] = array();
|
||||||
for ($i=0;$i<count($members);$i++)
|
for ($i=0;$i<count($members);$i++)
|
||||||
{
|
{
|
||||||
//echo $this->id2name($members[$i]['account_id']);
|
//echo $this->id2name($members[$i]['account_id']);
|
||||||
$entry["memberuid"][$i] = $this->id2name($members[$i]['account_id']);
|
//$currname = "@@".$this->id2name($members[$i]['account_id'])."@@";
|
||||||
|
$currname = $this->id2name($members[$i]['account_id']);
|
||||||
|
//if (!ereg($currname, "@@" . join("@@", $entry["memberuid"]) . "@@"))
|
||||||
|
if (!$this->isin_array($currname,$entry["memberuid"]))
|
||||||
|
{
|
||||||
|
$entry["memberuid"][] = $currname;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
unset($entry["givenname"]);
|
unset($entry["givenname"]);
|
||||||
unset($entry["sn"]);
|
unset($entry["sn"]);
|
||||||
@ -325,7 +331,6 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// attribute was in LDAP, modify it
|
// attribute was in LDAP, modify it
|
||||||
//echo $val.' ';
|
|
||||||
ldap_modify($ds, $allValues[0]["dn"], $tmpentry);
|
ldap_modify($ds, $allValues[0]["dn"], $tmpentry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -340,6 +345,12 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isin_array($needle,$haystack=array())
|
||||||
|
{
|
||||||
|
for($i=0;$i<count($haystack) && $haystack[$i] !=$needle;$i++);
|
||||||
|
return ($i!=count($haystack));
|
||||||
|
}
|
||||||
|
|
||||||
function add($account_name, $account_type, $first_name, $last_name, $passwd = False)
|
function add($account_name, $account_type, $first_name, $last_name, $passwd = False)
|
||||||
{
|
{
|
||||||
$this->create($account_name, $account_type, $first_name, $last_name, $passwd);
|
$this->create($account_name, $account_type, $first_name, $last_name, $passwd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user