mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Editing now working via update function
This commit is contained in:
parent
db844b2ddb
commit
66bea73872
@ -542,7 +542,7 @@
|
||||
if ($ldap_fields[0]['dn']) {
|
||||
$dn = $ldap_fields[0]['dn'];
|
||||
list($stock_fields,$stock_fieldnames,$extra_fields) = $this->split_stock_and_extras($fields);
|
||||
if (count($stock_fields)) {
|
||||
if (gettype($stock_fieldnames) == "array") {
|
||||
$stock_fields['phpgwowner'] = $owner;
|
||||
// Check each value, add our extra attributes if they are missing, and
|
||||
// otherwise fix the entry while we can
|
||||
@ -590,10 +590,13 @@
|
||||
$err = ldap_mod_add($this->ldap,$dn,array('objectclass' => $stock_fields['objectclass']));
|
||||
}
|
||||
|
||||
while ( list($fname,$fvalue) = each($this->stock_contact_fields) ) {
|
||||
if (empty($ldap_fields[0][$fvalue])) {
|
||||
// OK, just add the data already
|
||||
while ( list($fname,$fvalue) = each($stock_fieldnames) ) {
|
||||
if ($ldap_fields[0][$fvalue]) {
|
||||
//echo "<br>".$fname." was there";
|
||||
$err = ldap_modify($this->ldap,$dn,array($fvalue => $stock_fields[$fname]));
|
||||
} elseif (!$ldap_fields[0][$fvalue]) {
|
||||
//echo "<br>".$fname." not there";
|
||||
$err = ldap_mod_add($this->ldap,$dn,array($fvalue => $stock_fields[$fname]));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user