Merge pull request #1348 from atm-alexis/3.5
Improper use of delete() function and ldap with multientity bug corrections
This commit is contained in:
commit
ca36a4dd97
@ -2056,7 +2056,7 @@ class Propal extends CommonObject
|
||||
{
|
||||
// We remove directory
|
||||
$ref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->propal->dir_output)
|
||||
if ($conf->propal->dir_output && !empty($this->ref))
|
||||
{
|
||||
$dir = $conf->propal->dir_output . "/" . $ref ;
|
||||
$file = $dir . "/" . $ref . ".pdf";
|
||||
|
||||
@ -2457,7 +2457,7 @@ class Commande extends CommonOrder
|
||||
|
||||
// On efface le repertoire de pdf provisoire
|
||||
$comref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->commande->dir_output)
|
||||
if ($conf->commande->dir_output && !empty($this->ref))
|
||||
{
|
||||
$dir = $conf->commande->dir_output . "/" . $comref ;
|
||||
$file = $conf->commande->dir_output . "/" . $comref . "/" . $comref . ".pdf";
|
||||
|
||||
@ -1323,7 +1323,7 @@ class Facture extends CommonInvoice
|
||||
{
|
||||
// On efface le repertoire de pdf provisoire
|
||||
$ref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->facture->dir_output)
|
||||
if ($conf->facture->dir_output && !empty($this->ref))
|
||||
{
|
||||
$dir = $conf->facture->dir_output . "/" . $ref;
|
||||
$file = $conf->facture->dir_output . "/" . $ref . "/" . $ref . ".pdf";
|
||||
|
||||
@ -168,6 +168,15 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest)
|
||||
{
|
||||
dol_syslog("functions_ldap::check_user_password_ldap Sync user found id=".$user->id);
|
||||
// On verifie si le login a change et on met a jour les attributs dolibarr
|
||||
|
||||
if ($conf->multicompany->enabled) {
|
||||
global $mc;
|
||||
|
||||
$ret=$mc->checkRight($user->id, $entitytotest);
|
||||
if ($ret < 0) $login=false; // provoque l'echec de l'identification
|
||||
}
|
||||
|
||||
|
||||
if ($user->login != $ldap->login && $ldap->login)
|
||||
{
|
||||
$user->login = $ldap->login;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user