Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
dal Posted May 24, 2016 Posted May 24, 2016 I'm using the following code on my home page to display custom content to users who are logged in on the forum: $framework_url = 'forum/init.php'; require_once($framework_url); \IPS\Session\Front::i(); $member = \IPS\Member::loggedIn(); if ($member->member_group_id == $a) { //Show member stuff } else { //Show guest stuff } When a user visits the forum and then goes to the home page the code correctly reports that the user is logged in, however if a user goes away for a while so that their session expires and then returns to the home page, the code is reporting that they are logged out, even though a visit to the forum afterwards will show that they are actually still logged in. How do I get the above code to recognize that a user is logged in (like the forum does) even if their immediate session has expired ? Thank you.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.