1 install.core.inc install_hash_salt()

Installation task; Rewrite settings.php to include hash salt.

File

core/includes/install.core.inc, line 930
API functions for installing Backdrop.

Code

function install_hash_salt() {
  global $settings;

  if (empty($settings['hash_salt'])) {
    $update_settings["settings['hash_salt']"] = array(
      'value' => backdrop_random_key(),
      'required' => TRUE,
    );

    // Hash salt is optional, so allow installation even if it can't be written.
    try {
      backdrop_rewrite_settings($update_settings);
    }
    catch (Exception $e) {
    }
  }
}