Merge pull request #5739 from turbo124/v5-develop

Fixes for subdomain checks
This commit is contained in:
David Bomba 2021-05-18 23:12:18 +10:00 committed by GitHub
commit 50ba43c2e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 4 deletions

View File

@ -83,7 +83,7 @@ class Handler extends ExceptionHandler
'email' => 'anonymous@example.com', 'email' => 'anonymous@example.com',
'name' => 'Anonymous User', '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([ $scope->setUser([
'id' => auth()->user()->account->key, 'id' => auth()->user()->account->key,
'email' => 'anonymous@example.com', 'email' => 'anonymous@example.com',

View File

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

View File

@ -41,7 +41,7 @@ class SubdomainController extends BaseController
public function index() 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 not available'] , 401);
return response()->json(['message' => 'Domain available'], 200); return response()->json(['message' => 'Domain available'], 200);

View File

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