but it is not working in user´s profile.. I would define, that if current user logged in, echo “Current user is online”, and if cuttent user logged out, echo “Current user is offline”..
I’m looking for the same thing, I’d like to display just a single user’s own status on a profile page….?
I need the same thing. is there a way to do that? please
Hi, I just wrote a plugin WP-ONLINE-STATUS that does that. It displays Online or Offline for every user on your WordPress blog. You can change the default texts in the admin and some others options.
You can download it here
@kmaz
Just FYI, your plugin appears to conflict with the wp-useronline plugin by Lester Chan.
The error is:
Fatal error: Cannot redeclare useronline() (previously declared in /home/sechrest/public_html/wp-content/plugins/wp-useronline/wp-useronline.php:86) in /home/sechrest/public_html/wp-content/plugins/WP-Online-Status/WP-online-status.php on line 122
It appears both plugins declare a useronline() function.
I changed the name of your function and the add_action() call that uses it as well, and it at least allowed me to activate the plugin. Haven’t yet tested functionality.
@kmaz
The plugin doesn’t appear to be working for me, though it’s late and I’m awfully tired. No online/offline status shows after inserting the given line of code in my comment loop. I’ll give it another go tomorrow.