You are here

function _evercurrent_get_key in Evercurrent 7.2

Same name and namespace in other branches
  1. 7 evercurrent.send.inc \_evercurrent_get_key()

Helper function.

Retrieve a key from settings.php, or from variable.

1 call to _evercurrent_get_key()
evercurrent_run_update_check in ./evercurrent.send.inc

File

./evercurrent.send.inc, line 84

Code

function _evercurrent_get_key() {
  $override = variable_get('evercurrent_override', FALSE);

  // Key from regular configuration
  $config_key = variable_get('evercurrent_environment_token', NULL);

  // Key from settings.php
  $settings_key = variable_get('evercurrent_key', NULL);
  return $config_key && !$override ? $config_key : $settings_key;
}