You are here

function hook_acsf_staging_scrub_admin_roles_alter in Acquia Cloud Site Factory Connector 8

Same name and namespace in other branches
  1. 8.2 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()
drush_acsf_site_scrub in ./acsf.drush.inc
Command callback. Scrubs the site database and/or other storage.

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;
  }
}