From 1b709a91e13d9270302be706dfe695d00762e648 Mon Sep 17 00:00:00 2001 From: Viktor Date: Tue, 26 Nov 2019 13:01:56 +0300 Subject: [PATCH] Fix: Q2A nicknames detect fixed. --- cleantalk/inc/functions.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cleantalk/inc/functions.php b/cleantalk/inc/functions.php index 498151e..c9b00e1 100644 --- a/cleantalk/inc/functions.php +++ b/cleantalk/inc/functions.php @@ -201,7 +201,9 @@ function apbct_get_submit_time() * @return array */ function apbct_get_fields_any($arr, $message=array(), $email = null, $nickname = array('nick' => '', 'first' => '', 'last' => ''), $subject = null, $skip = false, $reg = false, $not_reg=false, $prev_key = '') - { + { + global $detected_cms; + // Skip request if fields exists $skip_params = array( 'ipn_track_id', // PayPal IPN # @@ -326,7 +328,10 @@ function apbct_get_fields_any($arr, $message=array(), $email = null, $nickname = $email = $value; // Names - }elseif (preg_match("/name/i", $key)){ + } elseif ( + preg_match( "/name/i", $key ) || + ( $detected_cms == 'Question2Answer' && preg_match( "/^handle$/i", $key ) ) + ){ preg_match("/(first.?name)?(name.?first)?(forename)?/", $key, $match_forename); preg_match("/(last.?name)?(family.?name)?(second.?name)?(surname)?/", $key, $match_surname);