Page MenuHomePhorge

Mailbox.php
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

Mailbox.php

<?php
namespace App\Handlers;
use App\Entitlement;
use App\Sku;
use App\User;
class Mailbox extends \App\Handlers\Base
{
public static function entitleableClass()
{
return \App\User::class;
}
public static function preReq($entitlement, $user)
{
if (!$entitlement->sku->active) {
\Log::error("Sku not active");
return false;
}
/*
FIXME: This code prevents from creating initial mailbox SKU
on signup of group account, because User::domains()
does not return the new domain.
Either we make sure to create domain entitlement before mailbox
entitlement or make the method here aware of that case or?
list($local, $domain) = explode('@', $user->email);
$domains = $user->domains();
foreach ($domains as $_domain) {
if ($domain == $_domain->namespace) {
return true;
}
}
\Log::info("Domain not for user");
*/
return true;
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Apr 24, 10:29 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18805686
Default Alt Text
Mailbox.php (1 KB)

Event Timeline