Symfony\Component\Security\Core\User\UserInterface::getRoles
Returns the roles granted to the user.
<code> public function getRoles() { return array('ROLE_USER'); } </code> Alternatively, the roles might be stored on a ``roles`` property, and populated in any number of different ways when the user object is created.
Signature
public function getRoles()
Returns
- array
- The user roles