Update: 2026-07-25 18:43:44
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user