mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
FIX retreiving user specific constant
This commit is contained in:
@@ -524,13 +524,13 @@ class FormOther
|
|||||||
if (!empty($user->socid)) {
|
if (!empty($user->socid)) {
|
||||||
$sql_usr .= " AND u.fk_soc = ".((int) $user->socid);
|
$sql_usr .= " AND u.fk_soc = ".((int) $user->socid);
|
||||||
}
|
}
|
||||||
if (getDolGlobalString('USER_HIDE_NONEMPLOYEE_IN_COMBOBOX')) {
|
if (getDolUserString('USER_HIDE_NONEMPLOYEE_IN_COMBOBOX', getDolGlobalString('USER_HIDE_NONEMPLOYEE_IN_COMBOBOX'))) {
|
||||||
$sql_usr .= " AND u.employee <> 0";
|
$sql_usr .= " AND u.employee <> 0";
|
||||||
}
|
}
|
||||||
if (getDolGlobalString('USER_HIDE_EXTERNAL_IN_COMBOBOX')) {
|
if (getDolUserString('USER_HIDE_EXTERNAL_IN_COMBOBOX', getDolGlobalString('USER_HIDE_EXTERNAL_IN_COMBOBOX'))) {
|
||||||
$sql_usr .= " AND u.fk_soc IS NULL";
|
$sql_usr .= " AND u.fk_soc IS NULL";
|
||||||
}
|
}
|
||||||
if (getDolGlobalString('USER_HIDE_INACTIVE_IN_COMBOBOX')) {
|
if (getDolUserString('USER_HIDE_INACTIVE_IN_COMBOBOX', getDolGlobalString('USER_HIDE_INACTIVE_IN_COMBOBOX'))) { // Can be set in setup of module User.
|
||||||
$sql_usr .= " AND u.statut <> 0";
|
$sql_usr .= " AND u.statut <> 0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ function getDolUserString($key, $default = '', $tmpuser = null)
|
|||||||
$tmpuser = $user;
|
$tmpuser = $user;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (string) (empty($tmpuser->conf->$key) ? $default : $tmpuser->conf->$key);
|
return (string) (isset($tmpuser->conf->$key) ? $tmpuser->conf->$key : $default);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -267,7 +267,7 @@ function getDolUserInt($key, $default = 0, $tmpuser = null)
|
|||||||
$tmpuser = $user;
|
$tmpuser = $user;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (int) (empty($tmpuser->conf->$key) ? $default : $tmpuser->conf->$key);
|
return (int) (isset($tmpuser->conf->$key) ? $tmpuser->conf->$key: $default);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user