Update: 2026-07-25 18:28:30

This commit is contained in:
Hamza-Ayed
2026-07-25 18:28:31 +03:00
parent 5e103f60f2
commit 4bbc687c15
9 changed files with 133 additions and 61 deletions
@@ -53,14 +53,18 @@ if ($stmt->rowCount() > 0) {
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
// Decrypt sensitive fields
$fieldsToDecrypt = ['phone', 'email', 'first_name', 'last_name', 'name_arabic', 'national_number', 'address', 'gender', 'site', 'birthdate'];
foreach ($rows as &$row) {
if (!empty($row['phone'])) {
$row['phone'] = $encryptionHelper->decryptData($row['phone']);
}
if (!empty($row['name_arabic'])) {
$row['name_arabic'] = $encryptionHelper->decryptData($row['name_arabic']);
foreach ($fieldsToDecrypt as $f) {
if (!empty($row[$f])) {
$dec = $encryptionHelper->decryptData($row[$f]);
if ($dec !== false && $dec !== null) {
$row[$f] = $dec;
}
}
}
}
unset($row);
jsonSuccess($rows);