Unify SSO and surface legacy ResellerClub hosting orders on the dashboard.
Deploy Ladill Hosting / deploy (push) Successful in 26s
Deploy Ladill Hosting / deploy (push) Successful in 26s
Add silent OAuth and session keepalive, and show imported RC orders alongside native hosting accounts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -222,6 +222,7 @@ class ImportHostingCommand extends Command
|
||||
unset($row['id'], $row['owner_public_id'], $row['owner_email']);
|
||||
$row['user_id'] = $owner->id;
|
||||
$row['platform_id'] = $platformId;
|
||||
$row['meta'] = $this->normalizeMeta($row['meta'] ?? null);
|
||||
|
||||
if ($commit) {
|
||||
HostingOrder::updateOrCreate(['platform_id' => $platformId], $row);
|
||||
@@ -335,6 +336,17 @@ class ImportHostingCommand extends Command
|
||||
]);
|
||||
}
|
||||
|
||||
/** @return array<string, mixed>|null */
|
||||
private function normalizeMeta(mixed $meta): ?array
|
||||
{
|
||||
while (is_string($meta)) {
|
||||
$decoded = json_decode($meta, true);
|
||||
$meta = json_last_error() === JSON_ERROR_NONE ? $decoded : null;
|
||||
}
|
||||
|
||||
return is_array($meta) ? $meta : null;
|
||||
}
|
||||
|
||||
/** @param array<string, mixed> $row */
|
||||
private function mapProductId(array &$row): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user