fix invalid token
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 49s
Tests / PHPUnit (push) Successful in 1m20s

This commit is contained in:
root
2026-08-30 21:10:35 -04:00
parent 140be9922d
commit 332b0d1007
9 changed files with 217 additions and 112 deletions
+4 -3
View File
@@ -11,7 +11,7 @@ class DeleteInactiveUsers extends BaseCommand
{
protected $group = 'Maintenance';
protected $name = 'users:delete-inactive-users';
protected $description = 'Delete users that are inactive and created more than 15 minutes ago, along with their entries in the parents table and user_roles table if applicable.';
protected $description = 'Delete unverified inactive registrations created more than 15 minutes ago, along with their entries in the parents table and user_roles table if applicable.';
public function run(array $params)
{
@@ -24,11 +24,12 @@ class DeleteInactiveUsers extends BaseCommand
log_message('debug', 'Cutoff time for deletion: ' . $cutoffTime);
// ─────────────────────────────────────────────────────
// 1Fetch inactive users older than 15 min
// 1Fetch unfinished registrations older than 15 min
// ─────────────────────────────────────────────────────
$users = $db->table('users')
->select('id, firstname, lastname, email, created_at')
->where('status', 'Inactive')
->where('is_verified', 0)
->where('created_at <', $cutoffTime)
->get()
->getResultArray();
@@ -102,4 +103,4 @@ class DeleteInactiveUsers extends BaseCommand
}
}
}