public function Webform::needsConfirmation in Little helpers 7
Same name and namespace in other branches
- 7.2 src/Webform/Webform.php \Drupal\little_helpers\Webform\Webform::needsConfirmation()
Check if webform_confirm_email is active and this submission has to be confirmed.
Return value
bool
File
- src/
Webform/ Webform.php, line 237
Class
Namespace
Drupal\little_helpers\WebformCode
public function needsConfirmation() {
if (!module_exists('webform_confirm_email')) {
return FALSE;
}
$q = db_select('webform_confirm_email', 'e');
$q
->join('webform_emails', 'we', 'we.nid=e.nid AND we.eid=e.eid');
$q
->fields('e', [
'eid',
])
->condition('e.email_type', 1)
->condition('we.nid', $this->node->nid);
if (self::is_webform4()) {
$q
->condition('we.status', 1);
}
return (bool) $q
->execute()
->fetch();
}