Changeset View
Changeset View
Standalone View
Standalone View
src/app/Jobs/User/CreateJob.php
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | public function handle() | ||||
$this->release(15); | $this->release(15); | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
$user->status |= \App\User::STATUS_IMAP_READY; | $user->status |= \App\User::STATUS_IMAP_READY; | ||||
} | } | ||||
$folders = \config('services.dav.default_folders'); | |||||
if (count($folders)) { | |||||
if (!\App\Backends\DAV::initDefaultFolders($user, $folders)) { | |||||
throw new \Exception("Failed to initialize DAV folders for user {$this->userId}."); | |||||
} | |||||
} | |||||
// Make user active in non-mandate mode only | // Make user active in non-mandate mode only | ||||
if ( | if ( | ||||
!($wallet = $user->wallet()) | !($wallet = $user->wallet()) | ||||
|| !($plan = $user->wallet()->plan()) | || !($plan = $user->wallet()->plan()) | ||||
|| $plan->mode != \App\Plan::MODE_MANDATE | || $plan->mode != \App\Plan::MODE_MANDATE | ||||
) { | ) { | ||||
$user->status |= \App\User::STATUS_ACTIVE; | $user->status |= \App\User::STATUS_ACTIVE; | ||||
} | } | ||||
$user->save(); | $user->save(); | ||||
} | } | ||||
} | } |