You are here

function services_keyauth_get_keys in Services 7

Same name and namespace in other branches
  1. 6.2 auth/services_keyauth/services_keyauth.module \services_keyauth_get_keys()
2 calls to services_keyauth_get_keys()
services_keyauth_admin_keys_list in auth/services_keyauth/services_keyauth.admin.inc
@file Generate security keys.
services_keyauth_get_key in auth/services_keyauth/services_keyauth.module

File

auth/services_keyauth/services_keyauth.module, line 126
@author Services Dev Team

Code

function services_keyauth_get_keys() {
  static $keys;
  if (!$keys) {
    $keys = array();
    $result = db_query("SELECT * FROM {services_keys}");
    while ($key = $result
      ->fetchObject()) {
      $keys[$key->kid] = $key;
    }
  }
  return $keys;
}