Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
Fix has_role compatibility in Symfony 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ostrolucky committed Jul 5, 2019
1 parent 646b3f2 commit ec6f18e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions EventListener/SecurityListener.php
Expand Up @@ -98,6 +98,10 @@ private function getVariables(KernelEvent $event)
} else {
$roles = $token->getRoles();
}

$roles = array_map(function ($role) {
return $role->getRole();
}, $roles);
}

$variables = [
Expand Down

0 comments on commit ec6f18e

Please sign in to comment.