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(); | ||||
// FIXME: I think we should also ignore domains marked as DELETED here, | |||||
// similar to what we do in User\CreateJob | |||||
vanmeeuwen: Marking a domain as deleted in LDAP is still valid, though, so I'd expect the domain to show up… | |||||
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); | ||||
} | } | ||||
} | } | ||||
} | } |
Marking a domain as deleted in LDAP is still valid, though, so I'd expect the domain to show up in LDAP with inetdomainstatus &= 8.