function poptin_fetch_row in Website Popups, Email Popup, Exit-Intent Popup, and Contact Forms – Poptin 7
Same name and namespace in other branches
- 8 poptin.module \poptin_fetch_row()
Implements poptin_fetch_row().
2 calls to poptin_fetch_row()
- poptin_generatepoptinlink in ./
poptin.module - Implements poptin_generatepoptinlink().
- poptin_page_build in ./
poptin.module - Implements hook_page_build().
File
- ./
poptin.module, line 323 - Module for adding popups on website.
Code
function poptin_fetch_row() {
$results = db_select('poptin', 'p')
->fields('p')
->execute();
$num_of_results = $results
->rowCount();
if ($num_of_results > 0) {
foreach ($results as $result) {
return array(
'userid' => $result->user_id,
'client_id' => $result->client_id,
'token' => $result->token,
);
}
}
else {
return FALSE;
}
}