Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120824862
Mailbox.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
Mailbox.php
View Options
<?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
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 10:29 AM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18805686
Default Alt Text
Mailbox.php (1 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline