adding email to fake users

This commit is contained in:
Julien Fastré 2018-09-11 11:46:19 +02:00
parent 2de25bc1af
commit b7d544f577

View File

@ -64,12 +64,15 @@ class LoadUsers extends AbstractFixture implements OrderedFixtureInterface, Cont
$user = new User();
$user->setUsername($username)
->setPassword(
$this->container->get('security.encoder_factory')
->getEncoder($user)
->encodePassword('password', $user->getSalt())
);
$user
->setUsername($username)
->setPassword(
$this->container->get('security.encoder_factory')
->getEncoder($user)
->encodePassword('password', $user->getSalt())
)
->setEmail(sprintf("%s@chill.social", \str_replace(' ', '', $username)))
;
foreach ($params['groupCenterRefs'] as $groupCenterRef) {
$user->addGroupCenter($this->getReference($groupCenterRef));