You are here

function hook_acsf_staging_scrub_preserved_users_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_preserved_users_alter()

Modifies the preserved list of user IDs for staged sites.

Use this hook to protect specific user accounts 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 $preserved_uids: An indexed array of integer user IDs to preserve.

1 invocation of hook_acsf_staging_scrub_preserved_users_alter()
drush_acsf_site_scrub in ./acsf.drush.inc
Command callback. Scrubs the site database and/or other storage.

File

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

Code

function hook_acsf_staging_scrub_preserved_users_alter(array &$preserved_uids) {
  if ($uids = \Drupal::config('mymodule')
    ->get('preserved_uids', [])) {
    $preserved_uids = array_merge($preserved_uids, $uids);
  }
}