You are here

function node_authlink_load_authkey in Node authorize link 8

Same name and namespace in other branches
  1. 7 node_authlink.module \node_authlink_load_authkey()

Loads key from NID.

2 calls to node_authlink_load_authkey()
NodeAuthlinkNodeForm::buildForm in src/Form/NodeAuthlinkNodeForm.php
Form constructor.
node_authlink_node_load in ./node_authlink.module
Implements hook_node_load().

File

./node_authlink.module, line 200
Node Authlink hooks and alters.

Code

function node_authlink_load_authkey($nid) {
  $result = \Drupal::database()
    ->query('SELECT authkey FROM {node_authlink_nodes} WHERE nid = :nid', [
    ':nid' => $nid,
  ]);
  return $result
    ->fetchField();
}