Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/User/ResyncCommand.php
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | public function handle() | ||||
} else { | } else { | ||||
if (!$user->isActive() || ($with_ldap && !$user->isLdapReady()) || !$user->isImapReady()) { | if (!$user->isActive() || ($with_ldap && !$user->isLdapReady()) || !$user->isImapReady()) { | ||||
if ($dry_run) { | if ($dry_run) { | ||||
$this->info("{$user->email}: will be pushed"); | $this->info("{$user->email}: will be pushed"); | ||||
continue; | continue; | ||||
} | } | ||||
\App\Jobs\User\CreateJob::dispatch($user->id); | \App\Jobs\User\CreateJob::dispatch($user->id); | ||||
$this->info("{$user->email}: pushed"); | |||||
} elseif (!empty($req_user)) { | } elseif (!empty($req_user)) { | ||||
if ($dry_run) { | if ($dry_run) { | ||||
$this->info("{$user->email}: will be pushed"); | $this->info("{$user->email}: will be pushed"); | ||||
continue; | continue; | ||||
} | } | ||||
// We push the update only if a specific user is requested, | // We push the update only if a specific user is requested, | ||||
// We don't want to flood the database/backend with an update of all users | // We don't want to flood the database/backend with an update of all users | ||||
Show All 10 Lines |