Jump to content

Loading member

Niko Belger

Recommended Posts



I'm trying to fetch the current logged in member with

  $member = \IPS\Member::loggedIn();

However, I always get the following exception (regardless if logged in or not)

'LOCATION_UNKNOWN' in /forum/system/Session/Session.php:60 Stack trace: #0 /forum/system/Member/Member.php(145): IPS\_Session::i() #1 /forum/hwid/API/API.php(14): IPS\_Member::loggedIn() #2 {main}


any suggestions?


Link to comment
Share on other sites

You need to provide a bit more context.  

Based on that error, it appears this is a script outside the IPS framework...If that's the case, it doesn't know if you're on the front end or AdminCP.  

/* Require the init.php file from the Community Suite root directory */
require '/path/to/suite/init.php';

/* Initiate the session to verify who this user is */

$member = \IPS\Member::loggedIn();
Link to comment
Share on other sites

I use the same way in another script, however there I do not get anny error. What exactly do you mean by running outisde the framework

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);


//Check permissions

try {
  $member = \IPS\Member::loggedIn();
} catch(  \RuntimeException $ex )
		echo $ex;


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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