Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 10th September 2019, 22:01
bizzarre13 bizzarre13 is offline
Member
 
Join Date: Apr 2013
P2P
Posts: 10
Default 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?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 16:55. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.