You are here

function shurly_get_uid in ShURLy 8

Same name and namespace in other branches
  1. 6 shurly_service/shurly_api_keys.inc \shurly_get_uid()
  2. 7 shurly_service/shurly_api_keys.inc \shurly_get_uid()
7 calls to shurly_get_uid()
DefaultController::shurly_service_access_api_key in shurly_service/src/Controller/DefaultController.php
DefaultController::shurly_service_expand in shurly_service/src/Controller/DefaultController.php
DefaultController::shurly_service_shorten in shurly_service/src/Controller/DefaultController.php
shurly_generate_new_api_key in shurly_service/shurly_api_keys.inc
Generate a new api key for this user and put it into the database.
shurly_service_access_api_key in shurly_service/shurly_service.module

... See full list

File

shurly_service/shurly_api_keys.inc, line 29

Code

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