mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 15:04:37 -04:00
Twilio
This commit is contained in:
parent
82bcd84c43
commit
6727f602a1
@ -21,6 +21,7 @@ use Twilio\Rest\Client;
|
|||||||
|
|
||||||
class TwilioController extends BaseController
|
class TwilioController extends BaseController
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
@ -38,6 +39,10 @@ class TwilioController extends BaseController
|
|||||||
|
|
||||||
$account = $user->company()->account;
|
$account = $user->company()->account;
|
||||||
|
|
||||||
|
if(stripos($request->phone, '+21') !== false) {
|
||||||
|
return response()->json(['message' => 'This phone number is not supported'], 400);
|
||||||
|
}
|
||||||
|
|
||||||
if (MultiDB::hasPhoneNumber($request->phone)) {
|
if (MultiDB::hasPhoneNumber($request->phone)) {
|
||||||
return response()->json(['message' => 'This phone number has already been verified with another account'], 400);
|
return response()->json(['message' => 'This phone number has already been verified with another account'], 400);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user