Changeset View
Changeset View
Standalone View
Standalone View
src/app/Handlers/Mailbox.php
<?php | <?php | ||||
namespace App\Handlers; | namespace App\Handlers; | ||||
use App\Entitlement; | use App\Entitlement; | ||||
use App\Sku; | use App\Sku; | ||||
use App\User; | use App\User; | ||||
class Mailbox | class Mailbox extends \App\Handlers\Base | ||||
{ | { | ||||
public static function entitleableClass() | public static function entitleableClass() | ||||
{ | { | ||||
return \App\User::class; | return \App\User::class; | ||||
} | } | ||||
public static function preReq(Entitlement $entitlement, User $user) | public static function preReq($entitlement, $user) | ||||
{ | { | ||||
if (!Sku::find($entitlement->sku_id)->active) { | if (!Sku::find($entitlement->sku_id)->active) { | ||||
\Log::error("Sku not active"); | \Log::error("Sku not active"); | ||||
return false; | return false; | ||||
} | } | ||||
/* | /* | ||||
FIXME: This code prevents from creating initial mailbox SKU | FIXME: This code prevents from creating initial mailbox SKU | ||||
on signup of group account, because User::domains() | on signup of group account, because User::domains() | ||||
Show All 19 Lines |