You are here

function poptin_check_csrf_token in Website Popups, Email Popup, Exit-Intent Popup, and Contact Forms – Poptin 7

Implements poptin_check_csrf_token().

4 calls to poptin_check_csrf_token()
poptin_deactivate in ./poptin.module
Implements poptin_deactivate().
poptin_generatepoptinlink in ./poptin.module
Implements poptin_generatepoptinlink().
poptin_login in ./poptin.module
Implements poptin_login().
poptin_signup in ./poptin.module
Implements poptin_signup().

File

./poptin.module, line 343
Module for adding popups on website.

Code

function poptin_check_csrf_token() {
  if (isset($_REQUEST['token'])) {
    $testtoken = drupal_valid_token($_REQUEST['token']);
    if ($testtoken) {
      return TRUE;
    }
    return FALSE;
  }
  return FALSE;
}