You are here

function key_provider_lockr_get_key_value in Lockr 7.2

Same name and namespace in other branches
  1. 7.3 plugins/key_provider/lockr.inc \key_provider_lockr_get_key_value()
  2. 7 plugins/key_provider/lockr.inc \key_provider_lockr_get_key_value()

Get callback for key_provider plugin.

Parameters

array $config: Key configuration array.

Return value

string|NULL The key value or NULL.

1 string reference to 'key_provider_lockr_get_key_value'
lockr.inc in plugins/key_provider/lockr.inc
Key provider plugin for lockr.

File

plugins/key_provider/lockr.inc, line 69
Key provider plugin for lockr.

Code

function key_provider_lockr_get_key_value($config) {
  if (!isset($config['id'])) {
    return '';
  }
  $key_name = $config['id'];
  $encoded = isset($config['key_provider_settings']['encoded']) ? $config['key_provider_settings']['encoded'] : NULL;
  $key_value = _lockr_get_key($key_name, $encoded);
  return $key_value ?: NULL;
}