[wp-hackers] Using WP Transients for User Sessions
jdg at codesymphony.co
Wed Oct 16 14:11:38 UTC 2013
First, this is not your transient:
Yours would look have 'users_online' in it. The easiest way to check if it was deleted is to call get_transient(). If it returns false, then the delete must have worked (or it is expired).
Secondly, there is a problem with your logic here, I think. You are deleting the data for all logged in users, when a single user logs out. I don't think that is what you want to do. You will want to either use a different transient for each user, or just delete them from the array when they log out.
More information about the wp-hackers