Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function destroy_login_after_time(){
- if (isset($_SESSION["LAST_ACTIVITY"]) && (time() - $_SESSION["LAST_ACTIVITY"] > $this->destroy_login_after_time)) {
- session_destroy();
- session_unset();
- }
- $_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement