You are here

function content_lock_get_release_token in Content locking (anti-concurrent editing) 7

Same name and namespace in other branches
  1. 6.2 content_lock.module \content_lock_get_release_token()
  2. 7.3 content_lock.module \content_lock_get_release_token()
  3. 7.2 content_lock.module \content_lock_get_release_token()

Calculate the token required to unlock a node.

Tokens are required because they prevent CSRF, https://security.drupal.org/node/2429.

5 calls to content_lock_get_release_token()
content_lock_node in ./content_lock.module
Try to lock a document for editing.
content_lock_overview in ./content_lock.module
Build an overview of locked documents.
content_lock_warn_pending_locks in ./content_lock.module
For every lock a user current have on any nodes, print a warning messagt with an link to release this node.
_content_lock_add_cancelbutton in ./content_lock.module
_content_lock_add_unload_js in ./content_lock.module

File

./content_lock.module, line 329
Allows users to lock documents for modification.

Code

function content_lock_get_release_token($nid) {
  return drupal_get_token("content_lock/release/{$nid}");
}