Jump to content

Checking if user is online stops working after upgrade on live site


Go to solution Solved by DamonT,

Recommended Posts

Posted (edited)

Hello, I just upgraded from version 4.5.4.2  to the latest one. Everything ran correctly. There are no errors in the logs, however, our external scripts that were based on whether the user was logged in stopped working. The following test script does not work on the latest version - it always shows a message about not being logged in. What could be causing this problem? The path to init.php is correct. My PHP version is 7.4.29.

<?php
    require_once '../../forum/init.php';
    \IPS\Session\Front::i();
    $member = \IPS\Member::loggedIn();
    if($member->member_id){
        echo "Logged in";
    } else {
        echo "Not logged in";
    }
?>

 

Edited by DamonT
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...