You are here

function poptin_is_user in Website Popups, Email Popup, Exit-Intent Popup, and Contact Forms – Poptin 8

Same name and namespace in other branches
  1. 7 includes/poptin.inc \poptin_is_user()

Implements poptin_is_user().

1 call to poptin_is_user()
poptin_render_html in includes/poptin.inc
Implements poptin_render_html().

File

includes/poptin.inc, line 343
Creating HTML for admin part, where user can signup or login for poptin.

Code

function poptin_is_user() {
  $result = \Drupal::database()
    ->select('poptin', 'p')
    ->fields('p')
    ->execute();
  $num_of_results = $result
    ->rowCount();
  if ($num_of_results > 0) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}