diff --git a/src/CoreBundle/Migrations/Schema/V200/Version20201212114910.php b/src/CoreBundle/Migrations/Schema/V200/Version20201212114910.php index 0b28445d4c..a6e16f80f2 100644 --- a/src/CoreBundle/Migrations/Schema/V200/Version20201212114910.php +++ b/src/CoreBundle/Migrations/Schema/V200/Version20201212114910.php @@ -69,8 +69,11 @@ final class Version20201212114910 extends AbstractMigrationChamilo $userId = $userEntity->getId(); $this->write("Migrating user: #$userId"); - $userEntity->setUuid(Uuid::v4()); - $userEntity->setRoleFromStatus($userEntity->getStatus()); + $userEntity + ->setUuid(Uuid::v4()) + ->setRoles([]) + ->setRoleFromStatus($userEntity->getStatus()) + ; $creatorId = $userEntity->getCreatorId(); $creator = null;