From 7fe717b76a6fa497332c646933faaa766a479d4a Mon Sep 17 00:00:00 2001 From: Frosin Date: Fri, 30 Aug 2019 17:20:39 +0300 Subject: [PATCH] fixed register new user --- .../classes/general/history/RetailCrmHistory_v5.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php index bcc082b1..2cc1f64d 100644 --- a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php +++ b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php @@ -126,7 +126,7 @@ class RetailCrmHistory } if ($registerNewUser === true) { - $userPassword = uniqid(); + $userPassword = uniqid("R"); $arFields = array( "EMAIL" => $customer['email'], @@ -137,7 +137,7 @@ class RetailCrmHistory ); $registeredUserID = $newUser->Add($arFields); if ($registeredUserID === false) { - RCrmActions::eventLog('RetailCrmHistory::orderHistory', 'CUser::Register', 'Error register user'); + RCrmActions::eventLog('RetailCrmHistory::orderHistory', 'CUser::Register', 'Error register user: ' . $newUser->LAST_ERROR); continue; } @@ -361,7 +361,7 @@ class RetailCrmHistory } if ($registerNewUser === true) { - $userPassword = uniqid(); + $userPassword = uniqid("R"); $newUser = new CUser; $arFields = array( @@ -384,7 +384,7 @@ class RetailCrmHistory $registeredUserID = $newUser->Add($arFields); if ($registeredUserID === false) { - RCrmActions::eventLog('RetailCrmHistory::orderHistory', 'CUser::Register', 'Error register user'); + RCrmActions::eventLog('RetailCrmHistory::orderHistory', 'CUser::Register', 'Error register user ' . $newUser->LAST_ERROR); continue; }