You are here

function userpoints_get_current_points in User Points 5

Same name and namespace in other branches
  1. 5.3 userpoints.module \userpoints_get_current_points()
  2. 5.2 userpoints.module \userpoints_get_current_points()
  3. 6 userpoints.module \userpoints_get_current_points()
  4. 7.2 userpoints.module \userpoints_get_current_points()
  5. 7 userpoints.module \userpoints_get_current_points()

Parameters

uid: user id of the user to get or lose the points:

Return value

number of current points in that user's account

2 calls to userpoints_get_current_points()
userpoints_user in ./userpoints.module
userpoints_userpointsapi in ./userpoints.module

File

./userpoints.module, line 209

Code

function userpoints_get_current_points($uid = 0) {
  return (int) db_result(db_query('SELECT points FROM {userpoints} WHERE uid = %d', $uid));
}