You are here

function key_get_keys_by_provider in Key 7.3

Get keys that use the specified key provider.

Parameters

string $key_provider_id: The key provider ID to use.

bool $reset: A flag to force the configurations to be retrieved from the database.

Return value

array An array of keys indexed by their IDs.

1 call to key_get_keys_by_provider()
key_get_key_names_as_options in ./key.module
Gets all key configurations as options, for use in forms.

File

./key.module, line 372
Main Key functionality and hook implementations.

Code

function key_get_keys_by_provider($key_provider_id, $reset = FALSE) {
  $filtered_keys = array();
  $keys = key_get_keys($reset);
  foreach ($keys as $id => $key) {
    if ($key['key_provider'] == $key_provider_id) {
      $filtered_keys[$id] = $key;
    }
  }
  return $filtered_keys;
}