In Loginet Platform Users are represented as Presentation
objects that implement Symfony's
AdvancedUserInterface
(doc)
They have roles (Loginet\UserBundle\Model\Presentation\Role
) implementing Symfony's RoleInterface
The UserManager
implements Symfony's UserProviderInterface
$user = $this->getUserFactory()->createUser();
$user
->setUsername('user')
->setEmail('test@test.com')
->setPassword('password', $this->get('security.encoder_factory')->getEncoder($user));
$this->getUserManager()->saveUser($user);
$user = $this->getUserManager()->loadUserByUsername('user');
$user = $this->getUserManager()->removeUser($user);