From 34e6db1ec1e111a228226b5df3a5fd89d04bb325 Mon Sep 17 00:00:00 2001 From: Shlee Date: Wed, 18 Feb 2026 18:22:32 +1030 Subject: [PATCH] Update AccountService.php --- app/Services/AccountService.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/Services/AccountService.php b/app/Services/AccountService.php index 3ce04d610..051f45562 100644 --- a/app/Services/AccountService.php +++ b/app/Services/AccountService.php @@ -82,6 +82,26 @@ class AccountService return Cache::forget(self::CACHE_KEY.$id); } + public static function getStatus($id) + { + $key = 'pf:services:account:status:'.$id; + + return Cache::remember($key, 900, function () use ($id) { + $profile = Profile::find($id); + + if (! $profile) { + return 'not-found'; + } + + return $profile->status ?? 'active'; + }); + } + + public static function clearStatusCache($id) + { + return Cache::forget('pf:services:account:status:'.$id); + } + public static function settings($id) { return Cache::remember('profile:compose:settings:'.$id, 604800, function () use ($id) {