Closed (fixed)
Project:
Classified Ads
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
6 Jan 2009 at 17:40 UTC
Updated:
10 Jul 2009 at 02:10 UTC
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
Comment #1
mykingla commented”reset classified ad expiration“ still not work
Comment #2
surjitbains commentedthanks for posting this ..finally users can edit their own ads..!
S
Comment #3
milesgillham commentedThe 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
Comment #4
milesgillham commentedFix applied to 6.x development branch.