CMXX - Product query updates

This commit is contained in:
“VeLiTi”
2025-02-25 11:10:00 +01:00
parent bc7e83efe9
commit 3a52632d61
19 changed files with 994 additions and 58 deletions

View File

@@ -57,7 +57,7 @@ if ($id != '' && $command == 'reset'){
$stmt->execute([$resetkey,$post_content['updatedby'],$id]);
//STEP 3 - Send DATA BACK TO FRONT_END
$messages = json_encode(array('consumer_email'=> $consumer_data['email'], "resetkey" => $resetkey), JSON_UNESCAPED_UNICODE);
$messages = json_encode(array('identity'=> $consumer_data['email'], "resetkey" => $resetkey), JSON_UNESCAPED_UNICODE);
//Send results
echo $messages;
exit;
@@ -69,7 +69,7 @@ if ($command == 'update'){
$stmt = $pdo->prepare('SELECT * FROM identity WHERE userkey = ?');
$stmt->execute([$id]);
$consumer_data = $stmt->fetch();
$post_content['updatedby'] = $consumer_data['email'];
if (isset($post_content['password'])){
@@ -82,6 +82,8 @@ elseif ($command == 'insert'){
$post_content['language'] = isset($post_content['language']) ? $post_content['language'] : 'US';
$post_content['profile'] = 0;
$post_content['isverified'] = 0;
$post_content['createdby'] = $username;
$post_content['updatedby'] = $username;
}
elseif ($command == 'login'){
@@ -103,7 +105,8 @@ elseif ($command == 'login'){
//CONSUMER LOGIN CORRECT RETURN DATA
$consumer = array(
'accountID' => $account['userkey'],
'profile' => $account['profile']
'profile' => $account['profile'],
'language' =>$account['language']
);
//Reset login count after succesfull attempt
@@ -173,6 +176,11 @@ if ($command == 'update' && (isAllowed('identity',$profile,$permission,'U') ===
$stmt = $pdo->prepare($sql);
$stmt->execute($execute_input);
//STEP 2- Send to user
$messages = json_encode(array('accountID' => $id,'status' => 'updated'), JSON_UNESCAPED_UNICODE);
//Send results
echo $messages;
exit;
}
elseif ($command == 'insert' && isAllowed('',$profile,$permission,'C') === 1){
@@ -188,7 +196,7 @@ elseif ($command == 'insert' && isAllowed('',$profile,$permission,'C') === 1){
$stmt->execute($execute_input);
//STEP 2- Send to user
$messages = json_encode(array('consumer_email'=> $post_content['email'],'accountID' => $account['userkey'],'profile' => $post_content['profile'], 'resetkey' => $resetkey), JSON_UNESCAPED_UNICODE);
$messages = json_encode(array('identity'=> $post_content['email'],'accountID' => $post_content['userkey'],'profile' => $post_content['profile'], 'resetkey' => $resetkey, 'language' =>$post_content['language']), JSON_UNESCAPED_UNICODE);
//Send results
echo $messages;
exit;