Modif de la mise à jour de ldap
This commit is contained in:
parent
019f8d1a22
commit
a28ff7bfe1
@ -103,6 +103,18 @@ class Contact
|
|||||||
|
|
||||||
if (defined('MAIN_MODULE_LDAP') && MAIN_MODULE_LDAP)
|
if (defined('MAIN_MODULE_LDAP') && MAIN_MODULE_LDAP)
|
||||||
{
|
{
|
||||||
|
update_ldap($user);
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function update_ldap($user)
|
||||||
|
{
|
||||||
|
$this->fetch($this->id);
|
||||||
|
|
||||||
$ds = dolibarr_ldap_connect();
|
$ds = dolibarr_ldap_connect();
|
||||||
|
|
||||||
if ($ds)
|
if ($ds)
|
||||||
@ -157,7 +169,7 @@ class Contact
|
|||||||
$info["phpgwContactCatId"] = 0;
|
$info["phpgwContactCatId"] = 0;
|
||||||
$info["phpgwContactAccess"] = "public";
|
$info["phpgwContactAccess"] = "public";
|
||||||
$info["phpgwContactOwner"] = $user->egroupware_id;
|
$info["phpgwContactOwner"] = $user->egroupware_id;
|
||||||
$info["givenName"] = $info["sn"];
|
$info["givenName"] = utf8_encode($this->firstname);
|
||||||
|
|
||||||
if ($this->phone_mobile)
|
if ($this->phone_mobile)
|
||||||
$info["phpgwCellTelephoneNumber"] = dolibarr_print_phone($this->phone_mobile);
|
$info["phpgwCellTelephoneNumber"] = dolibarr_print_phone($this->phone_mobile);
|
||||||
@ -183,8 +195,7 @@ class Contact
|
|||||||
echo "Unable to connect to LDAP server";
|
echo "Unable to connect to LDAP server";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mise à jour des infos persos
|
* Mise à jour des infos persos
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user