Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set a default account to make sure the correct timezone is set #5200

Merged
merged 2 commits into from Sep 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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