SSI (maybe) Get Member ID/Context of currently logged in user.

Started by Phases, July 02, 2009, 06:26:42 PM

Previous topic - Next topic

Phases

I have gone over the SSI examples here, and I see a few examples on how to get the member's context by calling a function with the member's ID as an argument.

But how do I get the member's ID?

This has been my main reference point, but I am clearly missing something:


<?phprequire('SSI.php');// By ID:loadMemberData(1);loadMemberContext(1);// At this point, $memberContext[user_id] contains the user's detailsecho '<pre>', print_r($memberContext[1], true), '</pre>';// By username:$return = loadMemberData('Daniel15');$userID = $return[0];loadMemberContext($userID);echo '<pre>', print_r($memberContext[$userID], true), '</pre>';// If you really want a function to replicate that IPB-SDK functionality :-)function member_info($member_id){ loadMemberData($member_id); loadMemberContext($member_id); return $memberContext[$member_id];}?>

Phases

Thank you!

Is there possibly some documentation somewhere on all of the variables available through SSI?


Advertisement: