Fix company phone number registration error messages for clarity
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user