function _access_unpublished_get_hash in Access unpublished 6
Create the hash to be used in the URL to gain access to the unpublished node. The hash value is created by combining the node ID with the private key supplied in the settings.
2 calls to _access_unpublished_get_hash()
- access_unpublished_get_access_url in ./
access_unpublished.module - Generate url to access the unpublished node.
- _access_unpublished_node_access in ./
access_unpublished.module - Returns true if the user has 'view unpublished ??? content' or if they have the permission corresponding to the node's content type.
File
- ./
access_unpublished.module, line 131 - This module is used to allow access to unpublished nodes
Code
function _access_unpublished_get_hash($nid) {
return md5($nid . variable_get('access_unpublished_privatekey', NULL));
}