Support Forum
Dre Erwin said
$spThisUser->ID doesnt work
OK - so where are you puttiung this code? What does it do? What is it for?
$spThisUser=>ID returns the user ID of the currently logged in user. Depending on where you are using it you may need to make it global first.
YELLOW
SWORDFISH
|
echo '<div>';
echo '<p>Platform:</p>';
echo '</div>';
echo '<div></div>';
echo '<div>';
echo '<p>';
sp_CustomProfileFieldsDisplay('Platform', $userid=0);
echo '</p>';
echo '</div>';
echo '<div>';
echo '<p>Gamertag:</p>';
echo '</div>';
echo '<div></div>';
echo '<div>';
echo '<p>';
sp_CustomProfileFieldsDisplay('Gamertag', $userid=0);
echo '</p>';
echo '</div>';
I asked what I needed to do becasue this is the script I am using in the forum view and I asked and was told to replace user id with $spThisUser->ID
but that didnt do anything. I want all users to be able to display their gamertags and platform in their profile while viewing topics and threads.
'Forum View'? I will assume by that you mean the spForumView.php theme template.
Well - to get the currently logged in userrs ID you need to use
$spThisUser->ID
Is this what you want? The currently logged in user?
As I said - you may have to declare the global first although you should not have to,
global $spThisUser;
What am I missing?
YELLOW
SWORDFISH
|
1 Guest(s)