Update: 2026-07-25 18:43:44

This commit is contained in:
Hamza-Ayed
2026-07-25 18:43:44 +03:00
parent 20ea9aa12c
commit e03b9c30d5
16 changed files with 144 additions and 206 deletions
@@ -53,18 +53,14 @@ 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) {
foreach ($fieldsToDecrypt as $f) {
if (!empty($row[$f])) {
$dec = $encryptionHelper->decryptData($row[$f]);
if ($dec !== false && $dec !== null) {
$row[$f] = $dec;
}
}
if (!empty($row['phone'])) {
$row['phone'] = $encryptionHelper->decryptData($row['phone']);
}
if (!empty($row['name_arabic'])) {
$row['name_arabic'] = $encryptionHelper->decryptData($row['name_arabic']);
}
}
unset($row);
jsonSuccess($rows);