1
0
mirror of synced 2024-11-22 05:16:09 +03:00

Merge pull request #80 from Frosin/master

fixed register new user
This commit is contained in:
Alex Lushpai 2019-09-06 15:40:18 +03:00 committed by GitHub
commit d06567ce7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,7 +126,7 @@ class RetailCrmHistory
} }
if ($registerNewUser === true) { if ($registerNewUser === true) {
$userPassword = uniqid(); $userPassword = uniqid("R");
$arFields = array( $arFields = array(
"EMAIL" => $customer['email'], "EMAIL" => $customer['email'],
@ -137,7 +137,7 @@ class RetailCrmHistory
); );
$registeredUserID = $newUser->Add($arFields); $registeredUserID = $newUser->Add($arFields);
if ($registeredUserID === false) { 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; continue;
} }
@ -361,7 +361,7 @@ class RetailCrmHistory
} }
if ($registerNewUser === true) { if ($registerNewUser === true) {
$userPassword = uniqid(); $userPassword = uniqid("R");
$newUser = new CUser; $newUser = new CUser;
$arFields = array( $arFields = array(
@ -384,7 +384,7 @@ class RetailCrmHistory
$registeredUserID = $newUser->Add($arFields); $registeredUserID = $newUser->Add($arFields);
if ($registeredUserID === false) { 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; continue;
} }