Help
General ArrowChat talk that doesn't fit any other forum.
User avatar
PRosenberg
Customer
 
Posts: 23
Joined: 22 Aug 2012, 15:27

 

by PRosenberg 07 Mar 2023, 13:20

I have modified the integration.php to check our database for how long a user is on the site and if it's lower than like 8 hours, it exits, the problem is that randomly it seems that with this code, users will lose the chat icon on the site, sometimes after 12 hours or more of it just sitting there. When that happens refreshing and even logging out and back in won't bring it back, fully deleting cache and cookies is the only way. The error that comes up in console log is "Uncaught SyntaxError: Unexpected identifier 'failed'" and it says it's occurring on autoload.php.

The code I am using looks like this:

$result = $db->execute("SELECT signupdate FROM users WHERE user_id='".$userid."' AND user_enabled=1");
if ($db->count_select() > 0)
{
$row = $db->fetch_array($result);
if((time()-$row["signupdate"])<=(60*60*8)){

exit;}

}
else{exit;}


Anyone experience this error?
User avatar
PRosenberg
Customer
 
Posts: 23
Joined: 22 Aug 2012, 15:27

 

by PRosenberg 12 Mar 2023, 10:15

Even removing this code it's still doing it randomly... what could be causing it?