Skip to content

Commit

Permalink
Set the default front page to /user
Browse files Browse the repository at this point in the history
This is to allow a default accessible front page to exist on first install.
  • Loading branch information
andybroomfield committed Aug 25, 2023
1 parent a67bcc5 commit dbf078a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions localgov.install
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ function localgov_install() {
$frontpage_view = View::load('frontpage');
$frontpage_view->setStatus(FALSE)->save();

// Set front page to /user.
// This is so there is a default accessible front page on first install.
\Drupal::configFactory()
->getEditable('system.site')
->set('page.front', '/user')
->save();

}

/**
Expand Down

0 comments on commit dbf078a

Please sign in to comment.