A protection to avoid situation loosing all admin accounts
This commit is contained in:
parent
cbd01bae49
commit
50b0019ead
@ -262,6 +262,10 @@ class User extends CommonObject
|
|||||||
$this->fk_member = $obj->fk_member;
|
$this->fk_member = $obj->fk_member;
|
||||||
$this->fk_user = $obj->fk_user;
|
$this->fk_user = $obj->fk_user;
|
||||||
|
|
||||||
|
// Protection when module multicompany was set, admin was set to first entity and the module disabled,
|
||||||
|
// then this admin user must be admin for all entities.
|
||||||
|
if (empty($conf->multicompany->enabled) && $this->admin && $this->entity == 1) $this->entity = 0;
|
||||||
|
|
||||||
// Retreive all extrafield for thirdparty
|
// Retreive all extrafield for thirdparty
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user