Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   terminate users session (http://www.bvlist.com/showthread.php?t=12152)

bizzarre13 10th September 2019 22:01

terminate users session
 
I want to terminate all users session after a perion of time, let's say 24h
I have this in bittorrent.php
Code:

function logincookie($id, $passhash, $updatedb = 1, $expires = 0x7fffffff)
{
        setcookie("uid", $id, $expires, "/");
        setcookie("pass", $passhash, $expires, "/");

  if ($updatedb)
          mysql_query("UPDATE users SET last_login = NOW() WHERE id = $id");
}

Tried to change $expires like this:
Code:

function logincookie($id, $passhash, $updatedb = 1, $expires = 0x15180)
{
        setcookie("uid", $id, $expires, "/");
        setcookie("pass", $passhash, $expires, "/");

  if ($updatedb)
          mysql_query("UPDATE users SET last_login = NOW() WHERE id = $id");
}

But it's not working. If i put any other value instead of 0x7fffffff , it will fail. Instead of redirecting me to my account, it redirects me again to login.php .
It's working only with 0x7fffffff value.
Maybe is another function to terminate all users session after a specific period?


All times are GMT +2. The time now is 16:29.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.