1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for subdomain checks

This commit is contained in:
David Bomba 2021-05-18 23:12:03 +10:00
parent 2f3509f42f
commit 470fb67877
4 changed files with 11 additions and 4 deletions

View File

@ -83,7 +83,7 @@ class Handler extends ExceptionHandler
'email' => 'anonymous@example.com',
'name' => 'Anonymous User',
]);
} elseif (auth()->guard('user') && auth()->guard('user')->user() && auth()->user()->companyIsSet() && auth()->user()->company()->account->report_errors) {
} elseif (auth()->guard('user') && auth()->guard('user')->user() && auth()->user()->company() && auth()->user()->company()->account->report_errors) {
$scope->setUser([
'id' => auth()->user()->account->key,
'email' => 'anonymous@example.com',

View File

@ -64,8 +64,8 @@ class StripeConnectController extends BaseController
// if($email = $request->getContact()->email)
// $endpoint .= "&stripe_user[email]={$email}";
$company_name = str_replace(" ", "_", $company->present()->name());
$endpoint .= "&stripe_user[business_name]={$company_name}";
// $company_name = str_replace(" ", "_", $company->present()->name());
// $endpoint .= "&stripe_user[business_name]={$company_name}";
return redirect($endpoint);
}
@ -83,6 +83,7 @@ class StripeConnectController extends BaseController
}catch(\Exception $e)
{
nlog($e->getMessage());
}

View File

@ -41,7 +41,7 @@ class SubdomainController extends BaseController
public function index()
{
if(in_array(request()->input('subdomain'), $this->protected) || MultiDB::findAndSetDbByDomain(request()->input('subdomain')))
if(in_array(request()->input('subdomain'), $this->protected) || MultiDB::findAndSetDbByDomain(['subdomain' => request()->input('subdomain')]))
return response()->json(['message' => 'Domain not available'] , 401);
return response()->json(['message' => 'Domain available'], 200);

View File

@ -94,6 +94,9 @@ return [
'prefix_indexes' => true,
'strict' => env('DB_STRICT', false),
'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8',
// 'options' => array(
// PDO::ATTR_EMULATE_PREPARES => true
// ),
],
'db-ninja-02' => [
@ -109,6 +112,9 @@ return [
'prefix_indexes' => true,
'strict' => env('DB_STRICT', false),
'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8',
// 'options' => array(
// PDO::ATTR_EMULATE_PREPARES => true
// ),
],
],