It's better to foreach through $loaded_users as there might be users who don't exist anymore. Right now the code has the same issue as before -- it shows deleted users in thankyou list.