Users Disconnecting

May 1, 2015
470
154
Hi,
When a user disconnects it's supposed to update the online column in the users table to 0, and it doesn't when a few users disconnect from the hotel causing the cms to say a false amount of users online because that's how i'm fetching the online users.

How would i fix this and make it put online to 0 for every user that disconnects?

Thanks.
 

n4te

zzz
Oct 27, 2014
669
293
Go into class.core and replace this
Code:
final public function getOnline()
    {
        global $engine;
        return $engine->result("SELECT status FROM server_status");
    }

With this
Code:
final public function getOnline()
    {
        global $engine;
    return $engine->result("SELECT Count(*) FROM users WHERE `online`='1'");
    }

that should do it.
 

Users who are viewing this thread

Top