|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isset($useReferer) && $useReferer == true) { |
|
|
if (isset($useReferer) && $useReferer == true) { |
|
|
$url = $request->request->get('_target_path'); |
|
|
$url = $request->request->get('_target_path'); |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
$user = $this->entityManager->getRepository(UserInterface::class)->findOneBy(['email' => $email]); |
|
|
$user = $this->entityManager->getRepository(UserInterface::class)->findOneBy(['email' => $email]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$roles = $user->getRoles(); |
|
|
$roles = $user->getRoles(); |
|
|
|
|
|
|
|
|
foreach ($rolesRedirection as $roleRedirect) { |
|
|
foreach ($rolesRedirection as $roleRedirect) { |
|
|
if (array_search($roleRedirect['role'], $roles)) { |
|
|
|
|
|
|
|
|
if (in_array($roleRedirect['role'], $roles)) { |
|
|
$routeName = $roleRedirect['redirect']; |
|
|
$routeName = $roleRedirect['redirect']; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |