Changeset View
Changeset View
Standalone View
Standalone View
src/app/Jobs/Group/CreateJob.php
Show All 9 Lines | class CreateJob extends GroupJob | ||||
* Execute the job. | * Execute the job. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$group = $this->getGroup(); | $group = $this->getGroup(); | ||||
if (!$group) { | |||||
return; | |||||
} | |||||
if (!$group->isLdapReady()) { | if (!$group->isLdapReady()) { | ||||
\App\Backends\LDAP::createGroup($group); | \App\Backends\LDAP::createGroup($group); | ||||
$group->status |= \App\Group::STATUS_LDAP_READY; | $group->status |= \App\Group::STATUS_LDAP_READY; | ||||
$group->save(); | $group->save(); | ||||
} | } | ||||
} | } | ||||
} | } |