Commit a4e5637a authored by Matthieu FAURE's avatar Matthieu FAURE

Merge remote-tracking branch 'origin/develop' into develop

parents 030952c6 a78745a3
Pipeline #10280 passed with stages
in 7 minutes and 5 seconds
doctrine_migrations:
migrations_paths:
'DoctrineMigrations' : 'src/Migrations'
'DoctrineMigrations' : '%kernel.project_dir%/src/Migrations'
storage:
# Default (SQL table) metadata storage configuration
......
"id";"login";"libelle";"pass_md5";"profile";"premiere_connexion";"adresse_mail";"echec"
1;admin;Compte Admin;e71d8ff6f1208475e14e2e1eb502c9fe;3;1;mwl@atolcd.fr;0
2;admin2;test;ef3c9e680da20386e32976d51853afc8;1;0;cgi@atolcd.com;0
3;notaire;notaire;e71d8ff6f1208475e14e2e1eb502c9fe;1;1;cgitest@atolcd.com;0
4;agent;agent;e71d8ff6f1208475e14e2e1eb502c9fe;4;1;cgi3@atolcd.com;0
1;admin;Compte de test admin;e71d8ff6f1208475e14e2e1eb502c9fe;3;1;admin@deptnot.test;0
3;notaire;Compte de test notaire;e71d8ff6f1208475e14e2e1eb502c9fe;1;1;notaire@deptnot.test;0
4;agent;Compte de test agent;e71d8ff6f1208475e14e2e1eb502c9fe;4;1;agent@deptnot.test;0
......@@ -29,6 +29,12 @@ class MigrationV2Command extends Command
*/
private $userRepository;
const ROLESV1 = [
1 => UserHelper::ROLE_NOTARY,
3 => UserHelper::ROLE_ADMIN,
4 => UserHelper::ROLE_AGENT
];
/**
* @var EntityManagerInterface
*/
......@@ -120,7 +126,7 @@ class MigrationV2Command extends Command
->setUsername(trim($lineValues[1]))
->setName(trim($lineValues[2]))
->setPassword('')
->setRoles([UserHelper::getRoleFromInt((int)trim($lineValues[4]))])
->setRoles([self::ROLESV1[trim($lineValues[4])]])
->setEmail(trim($lineValues[6]));
$this->entityManager->persist($user);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment