/**
* Implements hook_preprocess_HOOK().
*/
function EXAMPLE_preprocess_page(&$variables) {
$route_name = \Drupal::routeMatch()->getRouteName();
if ($route_name == 'entity.user.canonical') {
$current_user = \Drupal::currentUser();
$roles = $current_user->getRoles();
if