function encrypt_get_encrypt_drupal_variable_key in Encrypt 7.2
Same name and namespace in other branches
- 7.3 plugins/key_providers/drupal_variable.inc \encrypt_get_encrypt_drupal_variable_key()
Callback function to return a variable.
1 string reference to 'encrypt_get_encrypt_drupal_variable_key'
- encrypt_drupal_variable_encrypt_key_providers in plugins/
key_providers/ drupal_variable.inc - Implements MODULE_FILENAME_encrypt_key_providers().
File
- plugins/
key_providers/ drupal_variable.inc, line 27
Code
function encrypt_get_encrypt_drupal_variable_key($settings) {
$key = variable_get('encrypt_drupal_variable_key', NULL);
if (empty($key)) {
watchdog('encrypt', 'You need to set the encrypt_drupal_variable_key variable, preferably in $conf in your settings.php.', array(), WATCHDOG_EMERGENCY);
drupal_set_message(t("Encryption settings are insufficient. See your site log for more information."), 'error');
}
if (isset($settings['method'])) {
switch ($settings['method']) {
case 'base64_decode':
$key = base64_decode($key);
break;
}
}
return $key;
}