Commit b86e092e authored by Kseniya's avatar Kseniya
Browse files

add user 1 role admin

parent d4c63270
<?php
/**
* @file
* Install, update and uninstall functions for the standard installation profile.
*/
use Drupal\user\Entity\User;
/**
* Implements hook_install().
*
* Perform actions to set up the site for this profile.
*
* @see system_install()
*/
function synhelper_install() {
// Assign user 1 the "administrator" role.
$user = User::load(1);
$user->roles[] = 'administrator';
$user->save();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment