Quints Posted August 30, 2022 Share Posted August 30, 2022 My code: require_once $_SERVER['DOCUMENT_ROOT']. '/community/init.php'; \IPS\Session\Front::i(); $member = \IPS\Member::loggedin(); The code only works if I put the php file inside the community (ipb) folder, otherwise it will show that no one is logged in and give the info of a guest. How can I fix this? thanks Link to comment Share on other sites More sharing options...
Quints Posted August 30, 2022 Author Share Posted August 30, 2022 Update I've solved the problem by fixing the cookies define( 'COOKIE_PATH', '/' ); SeNioR- 1 Link to comment Share on other sites More sharing options...
Ryan Ashbrook Posted August 30, 2022 Share Posted August 30, 2022 In addition to that, instead of using \IPS\Session\Front::i(); for external scripts you should use \IPS\Dispatcher\External::i(); Quints, Afrodude and SeNioR- 3 Link to comment Share on other sites More sharing options...
Recommended Posts