Fix company phone number registration error messages for clarity

This commit is contained in:
Jeppe Bundgaard
2026-06-11 20:03:55 +02:00
parent af8968a87e
commit 8e0936001d
+3 -3
View File
@@ -416,7 +416,7 @@ class authRoute
if ($matchingEconomicCustomer !== null) {
if ($localUserExists) {
$response->error('Company phone number already registered', 400);
$response->error('Company phone number already registered 01', 400);
}
$this->bootstrapLocalCustomerOrFail($companyPhone);
@@ -441,7 +441,7 @@ class authRoute
}
if ($localUserExists) {
$response->error('Company phone number already registered', 400);
$response->error('Company phone number already registered 02', 400);
}
// Get the CVR company information used for the e-conomic customer payload.
@@ -765,7 +765,7 @@ class authRoute
private function localCustomerNumberExists(int $customerNumber): bool
{
$rows = (new users_o())->getFieldsWhere([
'customer_number' => (string)$customerNumber,
'customer_number' => (int)$customerNumber,
], ['id']);
return count($rows) > 0;