| 1 |
<?php |
| 2 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals. |
| 3 |
defined('ABSPATH') || die('Restricted Access'); |
| 4 |
|
| 5 |
use AcyMailing\Classes\UserClass; |
| 6 |
use AcyMailing\Helpers\CaptchaHelper; |
| 7 |
|
| 8 |
$currentUserEmail = acym_currentUserEmail(); |
| 9 |
$userClass = new UserClass(); |
| 10 |
$identifiedUser = $userClass->getOneByEmail($currentUserEmail); |
| 11 |
|
| 12 |
if (empty($identifiedUser) && $config->get('captcha', 'none') !== 'none' && acym_level(ACYM_ESSENTIAL)) { |
| 13 |
echo '<div class="onefield fieldacycaptcha" id="field_captcha_'.esc_attr($form->form_tag_name).'">'; |
| 14 |
$captcha = new CaptchaHelper(); |
| 15 |
$captcha->display($form->form_tag_name); |
| 16 |
echo '</div>'; |
| 17 |
} |
| 18 |
|