Changeset View
Changeset View
Standalone View
Standalone View
src/app/Domain.php
Show First 20 Lines • Show All 434 Lines • ▼ Show 20 Line(s) | |||||
$mailboxSKU = \App\Sku::withObjectTenantContext($this)->where('title', 'mailbox')->first(); | $mailboxSKU = \App\Sku::withObjectTenantContext($this)->where('title', 'mailbox')->first(); | ||||
if (!$mailboxSKU) { | if (!$mailboxSKU) { | ||||
\Log::error("No mailbox SKU available."); | \Log::error("No mailbox SKU available."); | ||||
return []; | return []; | ||||
} | } | ||||
$entitlements = $wallet->entitlements() | return $wallet->entitlements() | ||||
->where('entitleable_type', \App\User::class) | ->where('entitleable_type', \App\User::class) | ||||
->where('sku_id', $mailboxSKU->id)->get(); | ->where('sku_id', $mailboxSKU->id) | ||||
->get() | |||||
$users = []; | ->pluck('entitleable') | ||||
->all(); | |||||
foreach ($entitlements as $entitlement) { | |||||
$users[] = $entitlement->entitleable; | |||||
} | |||||
return $users; | |||||
} | } | ||||
/** | /** | ||||
* Verify if a domain exists in DNS | * Verify if a domain exists in DNS | ||||
* | * | ||||
* @return bool True if registered, False otherwise | * @return bool True if registered, False otherwise | ||||
* @throws \Exception Throws exception on DNS or DB errors | * @throws \Exception Throws exception on DNS or DB errors | ||||
*/ | */ | ||||
Show All 24 Lines |