Changeset View
Changeset View
Standalone View
Standalone View
src/app/Jobs/Group/DeleteJob.php
Show All 9 Lines | class DeleteJob 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; | |||||
} | |||||
// sanity checks | // sanity checks | ||||
if ($group->isDeleted()) { | if ($group->isDeleted()) { | ||||
$this->fail(new \Exception("Group {$this->groupId} is already marked as deleted.")); | $this->fail(new \Exception("Group {$this->groupId} is already marked as deleted.")); | ||||
return; | return; | ||||
} | } | ||||
\App\Backends\LDAP::deleteGroup($group); | \App\Backends\LDAP::deleteGroup($group); | ||||
Show All 9 Lines |