Hi again,

would it be possible to have votingapi_get_user_votes() return the votes for the current user by default, when NULL is passed as uid ?
This would be the patch:

Change

function votingapi_get_user_votes($content_type, $content_id, $uid) {
  return _votingapi_get_raw_votes($content_type, $content_id, NULL, NULL, $uid);
}

To:

function votingapi_get_user_votes($content_type, $content_id, $uid = NULL) {
  global $user;

  if($uid == NULL) { $uid = $user->uid; }
  return _votingapi_get_raw_votes($content_type, $content_id, NULL, NULL, $uid);
}

Comments

eaton’s picture

Status: Reviewed & tested by the community » Fixed

Checked in. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)