Gestion de LDAP si le module est activé
This commit is contained in:
parent
3908d6fce9
commit
d2c090e3ac
@ -94,6 +94,8 @@ class Contact
|
|||||||
print $this->db->error() . '<br>' . $sql;
|
print $this->db->error() . '<br>' . $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (define('MAIN_MODULE_LDAP') && MAIN_MODULE_LDAP)
|
||||||
|
{
|
||||||
$ds = dolibarr_ldap_connect();
|
$ds = dolibarr_ldap_connect();
|
||||||
|
|
||||||
if ($ds)
|
if ($ds)
|
||||||
@ -145,10 +147,9 @@ class Contact
|
|||||||
{
|
{
|
||||||
echo "LDAP bind failed...";
|
echo "LDAP bind failed...";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ldap_close($ds);
|
ldap_close($ds);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "Unable to connect to LDAP server";
|
echo "Unable to connect to LDAP server";
|
||||||
@ -156,6 +157,29 @@ class Contact
|
|||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mise à jour des infos persos
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function update_perso($id, $user=0)
|
||||||
|
{
|
||||||
|
|
||||||
|
$sql = "UPDATE llx_socpeople SET ";
|
||||||
|
$sql .= " birthday='".$db->idate($this->birthday)."'";
|
||||||
|
$sql .= " WHERE idp=$id";
|
||||||
|
|
||||||
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
|
if (!$result)
|
||||||
|
{
|
||||||
|
print $this->db->error() . '<br>' . $sql;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@ -241,6 +265,8 @@ class Contact
|
|||||||
print $this->db->error() . '<br>' . $sql;
|
print $this->db->error() . '<br>' . $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (define('MAIN_MODULE_LDAP') && MAIN_MODULE_LDAP)
|
||||||
|
{
|
||||||
$ds = dolibarr_ldap_connect();
|
$ds = dolibarr_ldap_connect();
|
||||||
|
|
||||||
if ($ds)
|
if ($ds)
|
||||||
@ -260,10 +286,9 @@ class Contact
|
|||||||
{
|
{
|
||||||
echo "LDAP bind failed...";
|
echo "LDAP bind failed...";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ldap_close($ds);
|
ldap_close($ds);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "Unable to connect to LDAP server";
|
echo "Unable to connect to LDAP server";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user