|
#1
|
|||
|
|||
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"); } 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"); } It's working only with 0x7fffffff value. Maybe is another function to terminate all users session after a specific period? |
|
|