function node_authlink_delete in Node authorize link 8
Deletes the node_authlink.
Parameters
$node:
3 calls to node_authlink_delete()
- NodeAuthlinkNodeForm::deleteAuthlink in src/
Form/ NodeAuthlinkNodeForm.php - Delete authlink submit callback.
- node_authlink_batch_delete in ./
node_authlink.module - Delete authkeys for all nodes in node type.
- node_authlink_node_delete in ./
node_authlink.module - Implements hook_ENTITY_TYPE_delete().
File
- ./
node_authlink.module, line 382 - Node Authlink hooks and alters.
Code
function node_authlink_delete($node) {
if (is_numeric($node)) {
$nid = $node;
}
else {
$nid = $node
->id();
}
// Delete keys
$count = \Drupal::database()
->delete('node_authlink_nodes')
->condition('nid', $nid)
->execute();
}