@ -122,7 +122,7 @@ class IslandoraCommands extends DrushCommands {
$account = $this->entityTypeManager->getStorage('user')->load($userid);
$userSession = new UserSession([
'uid' => $account->id(),
'name' => $account->getUsername(),
'name' => $account->getDisplayName(),
'roles' => $account->getRoles(),
]);
$this->accountSwitcher->switchTo($userSession);
@ -12,7 +12,7 @@ use Drupal\file\Entity\File;
* @Condition(
* id = "media_source_mimetype",
* label = @Translation("Media Source Mimetype"),
* context = {
* context_definitions = {
* "media" = @ContextDefinition("entity:media", required = FALSE, label = @Translation("Media"))
* }
* )