Closed (fixed)
Project:
User Points
Version:
5.x-3.x-dev
Component:
Code: userpoints API
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
1 Jan 2008 at 01:23 UTC
Updated:
18 Mar 2008 at 09:51 UTC
Added a new function to allow modules (like the new Advanced Forum) to query for a user's cumulative point earnings. Cumulative points are nice to show a user's long-time contribution to a site in cases when users are allowed to "redeem" their points for rewards (thereby deducting points from their normal total.
This function is almost identical to the already existing get_current_points() function:
function userpoints_get_current_points($uid = 0) {
return (int)db_result(db_query('SELECT points FROM {userpoints} WHERE uid = %d', $uid));
function userpoints_get_max_points($uid = 0) {
return (int)db_result(db_query('SELECT max_points FROM {userpoints} WHERE uid = %d', $uid));
| Comment | File | Size | Author |
|---|---|---|---|
| userpoints_02.patch | 559 bytes | kmillecam |
Comments
Comment #1
kmillecam commentedComment #2
jredding commentedadded to version 3
Comment #3
jredding commentedMoving over to 3, if someone wants to backport it and submit a patch feel free. All new development is on 3
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.