mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-06-06 06:46:25 +02:00
Add phone limit creation to phone creation
This commit is contained in:
parent
fd1e7b5519
commit
298bba0c39
8 changed files with 231 additions and 21 deletions
|
@ -535,7 +535,7 @@ namespace controllers\publics;
|
|||
return $this->json($return);
|
||||
}
|
||||
|
||||
$name_exist = $this->internal_phone->get_by_name($name);
|
||||
$name_exist = $this->internal_phone->get_by_name_and_user($this->user['id'], $name);
|
||||
if ($name_exist)
|
||||
{
|
||||
$return['error'] = self::ERROR_CODES['INVALID_PARAMETER'];
|
||||
|
@ -683,7 +683,7 @@ namespace controllers\publics;
|
|||
}
|
||||
|
||||
|
||||
$phone_with_same_name = $this->internal_phone->get_by_name($name);
|
||||
$phone_with_same_name = $this->internal_phone->get_by_name_and_user($this->user['id'], $name);
|
||||
if ($phone_with_same_name && $phone_with_same_name['id'] != $phone['id'])
|
||||
{
|
||||
$return['error'] = self::ERROR_CODES['INVALID_PARAMETER'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue