enhance check for requirement of company field
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -96,7 +96,7 @@ class Customers extends ApiCommand implements ResourceEntity
|
||||
// parameters
|
||||
$name = $this->getParam('name', true, '');
|
||||
$firstname = $this->getParam('firstname', true, '');
|
||||
$company_required = (empty($name) && empty($firstname));
|
||||
$company_required = (! empty($name) && empty($firstname)) || (empty($name) && ! empty($firstname)) || (empty($name) && empty($firstname));
|
||||
$company = $this->getParam('company', $company_required, '');
|
||||
$street = $this->getParam('street', true, '');
|
||||
$zipcode = $this->getParam('zipcode', true, '');
|
||||
|
||||
Reference in New Issue
Block a user