Returns a list of roles.
Return value
array
List of role IDs.
Overrides AccountInterface::getRoles
File
- drupal/core/lib/Drupal/Core/Session/UserSession.php, line 90
- Contains \Drupal\Core\Session\UserSession.
Class
- UserSession
- An implementation of the user account interface for the global user.
Namespace
Drupal\Core\Session
Code
public function getRoles() {
return $this->roles;
}