ober Posted June 21, 2011 Share Posted June 21, 2011 I'm just trying to determine if the user is logged into a Joomla site and inside the Session, they have objects that hold the information. But how do I access those objects? $_SESSION['__default'][$user->$username]; ? Nothing I try seems to work. Here is the structure of the dump from $_SESSION: Array ( [__default] => Array ( [session.counter] => 3 [session.timer.start] => 1308682834 [session.timer.last] => 1308682837 [session.timer.now] => 1308682837 [session.client.browser] => Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0 [registry] => JRegistry Object ( [_defaultNameSpace] => session [_registry] => Array ( [session] => Array ( [data] => stdClass Object ( ) ) ) [_errors] => Array ( ) ) [user] => JUser Object ( [id] => 0 [name] => [username] => [email] => [password] => [password_clear] => [usertype] => [block] => [sendEmail] => 0 [gid] => 0 [registerDate] => [lastvisitDate] => [activation] => [params] => [aid] => 0 There is more to it but I need to access the stuff in the 'user' object. Link to comment https://forums.phpfreaks.com/topic/240029-access-an-object-in-_session/ Share on other sites More sharing options...
TeNDoLLA Posted June 21, 2011 Share Posted June 21, 2011 Havent used Joomla, but maybe this works.. $userId = $array['__default']['user']->id; Link to comment https://forums.phpfreaks.com/topic/240029-access-an-object-in-_session/#findComment-1232972 Share on other sites More sharing options...
ober Posted June 21, 2011 Author Share Posted June 21, 2011 Thank you! I should have posted here 20 minutes ago! GAH. SOLVED. Link to comment https://forums.phpfreaks.com/topic/240029-access-an-object-in-_session/#findComment-1232974 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.