diff --git a/app/Commands/DeleteInactiveUsers.php b/app/Commands/DeleteInactiveUsers.php index b22812c..1fb02d2 100644 --- a/app/Commands/DeleteInactiveUsers.php +++ b/app/Commands/DeleteInactiveUsers.php @@ -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); // ───────────────────────────────────────────────────── - // 1 Fetch inactive users older than 15 min + // 1 Fetch 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 } -} \ No newline at end of file +} diff --git a/app/Controllers/View/ParentAttendanceReportController.php b/app/Controllers/View/ParentAttendanceReportController.php index fe78fe8..5713e88 100644 --- a/app/Controllers/View/ParentAttendanceReportController.php +++ b/app/Controllers/View/ParentAttendanceReportController.php @@ -442,7 +442,7 @@ class ParentAttendanceReportController extends BaseController } // ✅ Build formatted success message - $msg = '✅ Submission received successfully for ' . count($successNames) . ' item' . (count($successNames) > 1 ? 's' : '') . '.
'; + $msg = '✅ Submission received successfully for ' . count($successNames) . ' student' . (count($successNames) > 1 ? 's' : '') . '.
'; $msg .= '