Hey!
I am using content profile and a user-profile.tpl
Now i want to show the userpoints of the profile owner
print userpoints_get_current_points($profile->uid);
Only shows the userpoints of the currently loged in user. so it shows in every profile my userpoints :o
please help me

Comments

sensifreak’s picture

Could nobody help me?

sensifreak’s picture

Push

sensifreak’s picture

Please i need this fast!

sensifreak’s picture

hey pease how can i show user points in content profile`?

igorik’s picture

are you sure that $profile->uid is profile owner uid?
try to print somewhere in content profile, if the problem is not that you are using variable of logged user instead of profile owner.

yoeld’s picture

Hi,

Use the API function as follows:

userpoints_get_current_points($account->uid, $tid = NULL)

That works for me.

berdir’s picture

Status: Active » Fixed

Looks like this is fixed. If an invalid value is passed to userpoints_get_current_points() then it simply uses the current user.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Heihachi88’s picture

Component: Code: userpoints_basic » Code: userpoints

if you use content_profile module, then you should use this code to print points count in a profile:

print userpoints_get_current_points($node->uid);