Skip to content

Commit

Permalink
Remove code to add non-existent administrator role. (#794)
Browse files Browse the repository at this point in the history
* Remove code to add non-existent administrator role.

We have added a localgov_admin role that is supplied by
localgov_admin_role localgovdrupal/localgov_core#234
and included in this profile
0d19a7c
This role added to user 1 by core (and drush) automatically as
(the only) administrator role at the time of install.

* Remove now redundant use statement.
  • Loading branch information
ekes authored Dec 17, 2024
1 parent 6767ffd commit 567eea8
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions localgov.install
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Install functions for the LocalGovInstall installation profile.
*/

use Drupal\user\Entity\User;
use Drupal\views\Entity\View;

/**
Expand All @@ -19,11 +18,6 @@ function localgov_install() {

$config_factory = \Drupal::configFactory();

// Assign user 1 the "administrator" role.
$user = User::load(1);
$user->roles[] = 'administrator';
$user->save();

// Disable the frontpage view.
$frontpage_view = View::load('frontpage');
$frontpage_view->setStatus(FALSE)->save();
Expand Down

0 comments on commit 567eea8

Please sign in to comment.