simple_grouped_content-2.0.x-dev/modules/sgc_support_module/sgc_support_module.install

modules/sgc_support_module/sgc_support_module.install
<?php
/**
 * @file
 * Install, update and uninstall functions for the SGC install profile.
 */

use Drupal\user\Entity\User;

/**
 * Implements hook_install().
 *
 * Perform actions to set up the site for this profile.
 *
 * @see system_install()
 */
function sgc_support_module_install() {
  // Give user 1 admin role.
  $user = User::load(1);
  $user->roles[] = 'administrator';
  $user->save();
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc