function poptin_redirect_link in Website Popups, Email Popup, Exit-Intent Popup, and Contact Forms – Poptin 8
Same name and namespace in other branches
- 7 includes/poptin.inc \poptin_redirect_link()
Implements poptin_redirect_link().
1 call to poptin_redirect_link()
- poptin_render_html in includes/
poptin.inc - Implements poptin_render_html().
File
- includes/
poptin.inc, line 357 - Creating HTML for admin part, where user can signup or login for poptin.
Code
function poptin_redirect_link() {
global $base_url;
$redirect_link = $base_url;
$results = \Drupal::database()
->select('poptin', 'p')
->fields('p')
->execute();
foreach ($results as $result) {
if ($result->client_id != "" && $result->token != "") {
$redirect_link = 'https://app.popt.in/overview';
}
}
return $redirect_link;
}