You are here

function shurly_get_api_key in ShURLy 8

Same name and namespace in other branches
  1. 6 shurly_service/shurly_api_keys.inc \shurly_get_api_key()
  2. 7 shurly_service/shurly_api_keys.inc \shurly_get_api_key()
1 call to shurly_get_api_key()
shurly_api_key_form in shurly_service/shurly_service.module
Form callback; Display a form with a textfield containing a user's API key.

File

shurly_service/shurly_api_keys.inc, line 35

Code

function shurly_get_api_key($uid) {
  return \Drupal::database()
    ->query("SELECT apikey FROM {shurly_keys} WHERE uid = :uid", [
    'uid' => $uid,
  ])
    ->fetchField();
}