Changeset View
Changeset View
Standalone View
Standalone View
src/app/Jobs/User/CreateJob.php
Show All 25 Lines | class CreateJob extends UserJob | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$user = $this->getUser(); | $user = $this->getUser(); | ||||
if (!$user) { | if (!$user) { | ||||
return; | return; | ||||
} | } | ||||
if ($user->role) { | |||||
// Admins/resellers don't reside in LDAP (for now) | |||||
return; | |||||
} | |||||
// sanity checks | // sanity checks | ||||
if ($user->isDeleted()) { | if ($user->isDeleted()) { | ||||
$this->fail(new \Exception("User {$this->userId} is marked as deleted.")); | $this->fail(new \Exception("User {$this->userId} is marked as deleted.")); | ||||
return; | return; | ||||
} | } | ||||
if ($user->deleted_at) { | if ($user->deleted_at) { | ||||
$this->fail(new \Exception("User {$this->userId} is actually deleted.")); | $this->fail(new \Exception("User {$this->userId} is actually deleted.")); | ||||
Show All 32 Lines |