FIX php8 compatibility
This commit is contained in:
parent
31f45d29e5
commit
0aba1f6753
@ -487,7 +487,7 @@ class Users extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && !empty(DolibarrApiAccess::$user->admin) && empty(DolibarrApiAccess::$user->entity)) {
|
||||
if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && !empty(DolibarrApiAccess::$user->admin) && empty(DolibarrApiAccess::$user->entity)) {
|
||||
$entity = (!empty($entity) ? $entity : $conf->entity);
|
||||
} else {
|
||||
// When using API, action is done on entity of logged user because a user of entity X with permission to create user should not be able to
|
||||
|
||||
Loading…
Reference in New Issue
Block a user