Update: 2026-05-04 21:46:07
This commit is contained in:
@@ -41,11 +41,11 @@ try {
|
||||
// 3. Save to Database
|
||||
$stmt = $db->prepare("
|
||||
INSERT INTO companies (
|
||||
tenant_id, name, name_en, tax_identification_number, commercial_registration_number,
|
||||
id, tenant_id, name, name_en, tax_identification_number, commercial_registration_number,
|
||||
city, address, contact_email, contact_phone,
|
||||
jofotara_client_id_encrypted, jofotara_secret_key_encrypted,
|
||||
created_at
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
");
|
||||
|
||||
// Determine tenant_id: Super Admin chooses, Admin uses own
|
||||
@@ -60,6 +60,7 @@ try {
|
||||
}
|
||||
|
||||
$stmt->execute([
|
||||
\App\Core\Database::generateUuid(),
|
||||
$tenantId,
|
||||
$encryptedName,
|
||||
$encryptedNameEn,
|
||||
|
||||
@@ -59,8 +59,9 @@ if ($decoded['role'] === 'super_admin') {
|
||||
|
||||
// 4. Save to Database
|
||||
try {
|
||||
$stmt = $db->prepare("INSERT INTO users (tenant_id, name, email, email_hash, password_hash, role, created_at) VALUES (?, ?, ?, ?, ?, ?, ?)");
|
||||
$stmt = $db->prepare("INSERT INTO users (id, tenant_id, name, email, email_hash, password_hash, role, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
|
||||
$stmt->execute([
|
||||
\App\Core\Database::generateUuid(),
|
||||
$tenantId,
|
||||
$encryptedName,
|
||||
$encryptedEmail,
|
||||
|
||||
Reference in New Issue
Block a user