Changeset View
Changeset View
Standalone View
Standalone View
src/app/Jobs/Domain/CreateJob.php
Show All 9 Lines | class CreateJob extends DomainJob | ||||
* Execute the job. | * Execute the job. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$domain = $this->getDomain(); | $domain = $this->getDomain(); | ||||
if (!$domain) { | |||||
return; | |||||
} | |||||
if (!$domain->isLdapReady()) { | if (!$domain->isLdapReady()) { | ||||
\App\Backends\LDAP::createDomain($domain); | \App\Backends\LDAP::createDomain($domain); | ||||
$domain->status |= \App\Domain::STATUS_LDAP_READY; | $domain->status |= \App\Domain::STATUS_LDAP_READY; | ||||
$domain->save(); | $domain->save(); | ||||
\App\Jobs\Domain\VerifyJob::dispatch($domain->id); | \App\Jobs\Domain\VerifyJob::dispatch($domain->id); | ||||
} | } | ||||
} | } | ||||
} | } |