Issue #2249723 by andrei.dincu: Replace global with \Drupal::currentUser() in xmlsitemap_switch_user()