Ok.. Though SSI I can get $context['user'] and $User_Info.. Which returns some basics about the user.. But I want more.. So to do so I need to load the profile page up to get it..
I call summary page because it should contain all the user information..
if (!$context['user']['is_guest'] && $context['user']['is_admin'])
{
include($sourcedir . '/Profile.php');
summary($ID_MEMBER);
//print_r($context['user']);
//print_r($user_info);
print_r($context['member']);
$gname = $context['user']['name'];
$name = $context['user']['username'];
$email = $context['user']['email'];
}
I get an error that it can't load the user information from my id..
So I added
loadMemberContext($ID_MEMBER);
before I do the summary function call..
I also tried $context['user']['id']
I don't understand what the problem could be..
I am trying to get information like msn, yahoo and other stuff that appears in the summary page to be on this page im making..
You can use this as guidance.
<?php
require_once('SSI.php');
error_reporting(E_ALL);
echo '<pre>';
if (!$user_info['is_guest'])
{
loadMemberData($ID_MEMBER);
loadMemberContext($ID_MEMBER);
print_r($memberContext);
}
echo '</pre>';
?>
wouldnt it be possible to load the info from the database? SELECT `YIM` FROM `smf_members` WHERE `ID_MEMBER` = $context['user']['id']
something like that ?
Thanks Jay,
didn't know I needed data as well..
That got it working..
Now My Script is able to pull user information so they dont have to fill out as much..
@k_talk..
Why do that when It already is there by smf.. just need the right function to get it loaded..
k_talk you can do that but why do that when the data is already there?
sleepy - Yea you need to load the data first.