Using array(1) as 'access arguments' for hook_menu where 'access callback' is mp_marketplace_can_view_seller and using the user object passed to mp_marketplace_can_view_seller to compare the uid instead of arg(1) will make ubercart_marketplace compatible with the me module or any other module which changes/replaces the uid in the menu.

Comments

nohup’s picture

Title: User access aruments in hook_menu » Use access aruments in hook_menu
StatusFileSize
new14.6 KB

git patch against 6.x-1.x attached

longwave’s picture

Title: Use access aruments in hook_menu » Use access arguments in hook_menu
Status: Active » Needs work

Your patch changes many unnecessary lines.

arski’s picture

Category: task » bug

hmm, this is something that would be extremely useful indeed.. and kind of the normal practice too, so this pretty much a bug.

Before I go ahead with cleaning up that patch though - was there any particular reason why the arguments were commented out in the first place?

Alex Andrascu’s picture

What's the plan with this ?

Alex Andrascu’s picture

Status: Needs work » Needs review
StatusFileSize
new1.31 KB

There's a cleaned patch. Unfortunatelly is against an older dev version.