Update: 2026-05-08 14:05:50

This commit is contained in:
Hamza-Ayed
2026-05-08 14:05:50 +03:00
parent cfc330e291
commit 155c2d0fc0
13 changed files with 709 additions and 22 deletions

View File

@@ -46,8 +46,16 @@ $encryptedName = Encryption::encrypt($data['name']);
$encryptedEmail = Encryption::encrypt($data['email']);
$emailHash = hash('sha256', strtolower($data['email'])); // For fast lookup during login
$encryptedPhone = Encryption::encrypt($data['phone']);
$phoneHash = hash('sha256', preg_replace('/[^0-9+]/', '', $data['phone']));
$phone = preg_replace('/[^0-9+]/', '', $data['phone']);
$phone = ltrim($phone, '+');
if (str_starts_with($phone, '07')) {
$phone = '962' . substr($phone, 1);
} elseif (str_starts_with($phone, '7')) {
$phone = '962' . $phone;
}
$encryptedPhone = Encryption::encrypt($phone);
$phoneHash = hash('sha256', $phone);
// 3. Determine Tenant ID
$tenantId = null;