diff --git a/core/userrights.class.inc.php b/core/userrights.class.inc.php index 1dd824f99..023cdf1bd 100644 --- a/core/userrights.class.inc.php +++ b/core/userrights.class.inc.php @@ -385,6 +385,12 @@ abstract class User extends cmdbAbstractObject /** @var \DBObjectSet $oSet */ $oSet = $this->Get('profile_list'); if ($oSet->Count() == 0) { + if (ContextTag::Check(ContextTag::TAG_SETUP)) { + // During setup, if a profile is no more part of iTop, it will be deleted + // But if it is the only profile assigned to a user, we don't want this to stop the setup + SetupLog::Warning("The user with id: ".$this->GetKey()." is no more usable as its last profile was removed during setup"); + return; + } $this->m_aCheckIssues[] = Dict::S('Class:User/Error:AtLeastOneProfileIsNeeded'); }