You are here

function hook_acsf_staging_scrub_admin_roles_alter in Acquia Cloud Site Factory Connector 8.2

Same name and namespace in other branches
  1. 8 acsf.api.php \hook_acsf_staging_scrub_admin_roles_alter()

Modifies the preserved list of user roles for staged sites.

Use this hook to protect user accounts with specific role assignments from being scrubbed when you copy production websites to the staging environment. Scrubbed user accounts are assigned anonymous email addresses and have their passwords reset to randomized strings.

Parameters

array $admin_roles: An indexed array of integer role IDs - Users with these roles will be preserved.

1 invocation of hook_acsf_staging_scrub_admin_roles_alter()
AcsfCommands::siteScrub in src/Commands/AcsfCommands.php
Scrubs sensitive information regarding ACSF.

File

./acsf.api.php, line 41
Documents hooks provided by the ACSF module.

Code

function hook_acsf_staging_scrub_admin_roles_alter(array &$admin_roles) {
  if ($role = \Drupal::config('mymodule')
    ->get('admin_role')) {
    $admin_roles[] = $role;
  }
}