Fix getUserDomains for hosting app without site builder.
Deploy Ladill Hosting / deploy (push) Has been cancelled
Deploy Ladill Hosting / deploy (push) Has been cancelled
Skip websites/website_members lookups; domains are owned directly by user_id in the extracted hosting app. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -697,24 +697,8 @@ class HostingProductController extends Controller
|
||||
|
||||
private function getUserDomains($user): \Illuminate\Support\Collection
|
||||
{
|
||||
$websiteIds = \App\Models\Website::query()
|
||||
->where('owner_user_id', $user->id)
|
||||
->pluck('id')
|
||||
->merge(
|
||||
\App\Models\WebsiteMember::query()
|
||||
->where('user_id', $user->id)
|
||||
->pluck('website_id')
|
||||
)
|
||||
->unique();
|
||||
|
||||
return \App\Models\Domain::query()
|
||||
->where(function ($query) use ($user, $websiteIds) {
|
||||
$query->where('user_id', $user->id);
|
||||
|
||||
if ($websiteIds->isNotEmpty()) {
|
||||
$query->orWhereIn('website_id', $websiteIds);
|
||||
}
|
||||
})
|
||||
->where('user_id', $user->id)
|
||||
->whereNull('hosting_account_id')
|
||||
->whereDoesntHave('hostedSites')
|
||||
->where(function ($query) {
|
||||
|
||||
Reference in New Issue
Block a user