Changeset View
Changeset View
Standalone View
Standalone View
src/app/Jobs/Group/CreateJob.php
Show All 13 Lines | class CreateJob extends GroupJob | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$group = $this->getGroup(); | $group = $this->getGroup(); | ||||
if (!$group) { | if (!$group) { | ||||
return; | return; | ||||
} | } | ||||
if (!$group->isLdapReady()) { | if (\config('app.with_ldap') && !$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->status |= \App\Group::STATUS_ACTIVE; | |||||
$group->save(); | |||||
} | } | ||||
} | } |