You are here

function user_permissions_install in User Permissions 8

Same name and namespace in other branches
  1. 7 user_permissions.install \user_permissions_install()

Creates a dummy role with no permissions.

File

./user_permissions.install, line 13
Installation tasts for user_permissions.

Code

function user_permissions_install() {

  // Creates a new role with the name $role_name.
  $role = Role::create([
    'id' => USER_PERMISSIONS_NO_ROLE,
    'label' => USER_PERMISSIONS_NO_ROLE,
  ]);
  $role
    ->save();
}