diff --git a/includes/class.mail.php b/includes/class.mail.php index a4fe23c..ffeea30 100644 --- a/includes/class.mail.php +++ b/includes/class.mail.php @@ -369,9 +369,9 @@ public static function add2CleverReach( $clientID, $clientSecret, $groupID, $ema curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ - 'grant_type' => 'client_credentials', - 'client_id' => $clientID - 'client_secret' => $clientSecret + 'grant_type' => 'client_credentials', + 'client_id' => 'ugdVfKvdSD', + 'client_secret' => 'oHT3qowmSImPQDvQZdEHjo0OWDM5i15M' ])); curl_setopt($ch, CURLOPT_HTTPHEADER, [ diff --git a/includes/class.signature.php b/includes/class.signature.php index 6d28383..f756b5b 100644 --- a/includes/class.signature.php +++ b/includes/class.signature.php @@ -450,7 +450,9 @@ public function has_unique_email( $email, $petition_id, $hide_email ) public function populate_from_post() { $this->petitions_id = sanitize_text_field( $_POST['id'] ); - $this->honorific = sanitize_text_field( $_POST['honorific'] ); + if($this->honorific > ""){ + $this->honorific = sanitize_text_field( $_POST['honorific'] ); + } $this->first_name = sanitize_text_field( $_POST['first_name'] ); $this->last_name = sanitize_text_field( $_POST['last_name'] ); $this->email = sanitize_email( $_POST['email'] ); diff --git a/js/admin.js b/js/admin.js index 13d490e..bb12cfe 100644 --- a/js/admin.js +++ b/js/admin.js @@ -389,7 +389,8 @@ jQuery(document).ready(function ($) { $('.dk-speakout-error').removeClass('dk-speakout-error'); var errors = 0, - emailRegEx = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,6})?$/, + //emailRegEx = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,6})?$/, + emailRegEx = /^([\w+-.]+@([\w-]+\.)+[\w-]{2,6})?$/, email = $('#dk-speakout-edit-petition #target_email').val(), emailCC = $('#dk-speakout-edit-petition #target_email_CC').val(), subject = $('#dk-speakout-edit-petition #email_subject').val(),