Changeset View
Changeset View
Standalone View
Standalone View
src/app/Jobs/User/VerifyJob.php
Show All 13 Lines | class VerifyJob extends UserJob | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$user = $this->getUser(); | $user = $this->getUser(); | ||||
if (!$user) { | if (!$user) { | ||||
return; | return; | ||||
} | } | ||||
if ($user->role) { | |||||
// Admins/resellers don't reside in IMAP (for now) | |||||
return; | |||||
} | |||||
// sanity checks | // sanity checks | ||||
if (!$user->hasSku('mailbox')) { | if (!$user->hasSku('mailbox')) { | ||||
$this->fail(new \Exception("User {$this->userId} has no mailbox SKU.")); | $this->fail(new \Exception("User {$this->userId} has no mailbox SKU.")); | ||||
return; | return; | ||||
} | } | ||||
// the user has a mailbox (or is marked as such) | // the user has a mailbox (or is marked as such) | ||||
if ($user->isImapReady()) { | if ($user->isImapReady()) { | ||||
Show All 11 Lines |