Hello,

I think I have found a minor typo in the code of the paypernode_user_get_balance function. Line 688 says this:
$uid = user_access('administer pay per node system') ? ($uid ? $uid : $user->uid) : $user->uid;

$uid refers to which users pay per node balance will be retrieved.

In other words- if this is an administrator of the ppn system, set $uid to the 'client' user (if given) ; otherwise, set it to whatever user is requesting the page.

The bug is minor - it should read 'administer pay-per-node system' instead of 'administer pay per node system' (the dashes were missing).

This expressed itself this way: when an ppn administrator (but not uid=1) tried to look at (and edit) someone elses paypernode balance, his own pay per node balance was returned instead.

I will investigate writing a patch to correct this.

CommentFileSizeAuthor
#1 paypernode.module.5.x.access-dashes.patch693 bytesjimurl

Comments

jimurl’s picture

StatusFileSize
new693 bytes

Here is a patch for the above-mentioned problem. Note that the repository references are local cvs.

jimurl’s picture

Status: Active » Needs review
jimurl’s picture

Status: Needs review » Needs work
maurizio.ganovelli’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Assigned: Unassigned » maurizio.ganovelli
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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