function _botcha_get_token in BOTCHA Spam Prevention 7
Same name and namespace in other branches
- 6 botcha.botcha.inc \_botcha_get_token()
Custom token (session) management for anonymous users.
2 calls to _botcha_get_token()
- _botcha_set_form_cache in ./
botcha.botcha.inc - BOTCHA cache functions - set, get, clear
- _botcha_valid_token in ./
botcha.botcha.inc
File
- ./
botcha.botcha.inc, line 701 - Implementation of botcha form logic.
Code
function _botcha_get_token($value = '') {
if (empty($_SESSION['botcha_session'])) {
$_SESSION['botcha_session'] = session_id();
}
return drupal_hmac_base64($value, $_SESSION['botcha_session'] . drupal_get_private_key() . drupal_get_hash_salt());
}