Users with the 'edit own' privileges receive an access denied message when visiting node/*/edit. Debugging shows that $account->uid in function ed_classified_access is empty or null or something similar, so the test around line 446 for $account->uid == $node->uid fails.

Following the example at http://drupal.org/node/114774#hook_access, it appears that $account as parameter replaces global $account. I'm guessing the additional global declaration is creating a collision.

Commenting out the global $account line around 439 fixes this issue for me.

Comments

mykingla’s picture

”reset classified ad expiration“ still not work

surjitbains’s picture

thanks for posting this ..finally users can edit their own ads..!

S

milesgillham’s picture

Assigned: Unassigned » milesgillham

The fix involving commenting out global $account appears to the right thing to do. I'll roll that into the next update. I'd like to hear more from mykingla about what's not working for classified ad expiration reset as it seems to be working from what I can see.

Cheers,

Miles

milesgillham’s picture

Status: Active » Fixed

Fix applied to 6.x development branch.

Status: Fixed » Closed (fixed)

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