mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-14 08:54:21 +01:00
Fix: missing superadmin
This commit is contained in:
@@ -101,11 +101,15 @@ $sql.= ", s.code_client";
|
||||
$sql.= ", s.canvas";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_soc = s.rowid";
|
||||
if (! empty($conf->multicompany->enabled))
|
||||
{
|
||||
// TODO add hook
|
||||
if (! empty($conf->multicompany->enabled)) {
|
||||
if (! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||
if ($conf->entity == 1 && ! empty($user->admin) && empty($user->entity)) {
|
||||
$sql.= " WHERE u.entity IS NOT NULL";
|
||||
if (! empty($user->admin) && empty($user->entity)) {
|
||||
if ($conf->entity == 1) {
|
||||
$sql.= " WHERE u.entity IS NOT NULL";
|
||||
} else {
|
||||
$sql.= " WHERE u.entity IN (".getEntity('user').")";
|
||||
}
|
||||
} else {
|
||||
$sql.= ",".MAIN_DB_PREFIX."usergroup_user as ug";
|
||||
$sql.= " WHERE ug.fk_user = u.rowid";
|
||||
@@ -114,9 +118,7 @@ if (! empty($conf->multicompany->enabled))
|
||||
} else {
|
||||
$sql.= " WHERE u.entity IN (".getEntity('user').")";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$sql.= " WHERE u.entity IN (".getEntity('user').")";
|
||||
}
|
||||
if (!empty($socid)) $sql.= " AND u.fk_soc = ".$socid;
|
||||
|
||||
Reference in New Issue
Block a user