Skip to content

Commit

Permalink
Set a default account to make sure the correct timezone is set (#5200)
Browse files Browse the repository at this point in the history
* Set a default account to make sure the correct timezone is set

* Add missing use statement
  • Loading branch information
DieterHolvoet committed Sep 3, 2022
1 parent 5f9ca1c commit a3ff4ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Boot/DrupalBoot8.php
Expand Up @@ -7,6 +7,7 @@
use Drupal\Core\Database\Database;
use Drupal\Core\Render\HtmlResponse;
use Drupal\Core\DrupalKernel;
use Drupal\Core\Session\AnonymousUserSession;
use Drush\Config\ConfigLocator;
use Drush\Drupal\DrushLoggerServiceProvider;
use Drush\Drupal\DrushServiceModifier;
Expand Down Expand Up @@ -248,6 +249,9 @@ public function bootstrapDrupalFull(BootstrapManager $manager): void

parent::bootstrapDrupalFull($manager);
$this->addDrupalModuleDrushCommands($manager);

// Set a default account to make sure the correct timezone is set
$this->kernel->getContainer()->get('current_user')->setAccount(new AnonymousUserSession());
}

public function addDrupalModuleDrushCommands($manager): void
Expand Down

0 comments on commit a3ff4ab

Please sign in to comment.