Userpoints in Profile

sensifreak - August 26, 2009 - 10:51
Project:User Points
Version:6.x-1.0
Component:Code: userpoints_basic
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

Hey!
I am using content profile and a user-profile.tpl
Now i want to show the userpoints of the profile owner

<?php
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

#1

sensifreak - August 28, 2009 - 16:49

Could nobody help me?

#2

sensifreak - September 1, 2009 - 09:52

Push

#3

sensifreak - September 16, 2009 - 15:35

Please i need this fast!

#4

sensifreak - October 14, 2009 - 04:20

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

#5

igorik - October 22, 2009 - 23:03

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.

#6

yoeld - October 28, 2009 - 06:17

Hi,

Use the API function as follows:

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

That works for me.

 
 

Drupal is a registered trademark of Dries Buytaert.