Mibew Messenger Community
General => Support => Topic started by: arakan on May 05, 2016, 02:34:22 PM
-
Hello guys, I need to show on my site if an operator with a specific code is online or not.
How to do this?
best regards
-
Hi all,
I think this is the best way:
<?php
require('libs/init.php');
echo is_operator_online(1)?'online':'offline';
exit;
?>
-
Hello,
is_operator_online() would work just as you have described. However, this id (or 'code') that is passed into the function is a database id, which is not something that is easily exposed to a user interface.
On that admin panel under "Operators -> [username] -> General", there is a code field there. I have never tried to use it so I don't know how it works. Not sure what your use case is, but it may be worth plugging into that such that you rely on a user defined value rather than a database id.