I'm rather inexperienced in module development, sometimes I have really basic issues: I'd like to grant custom access to user profiles. I think I can do it with the implementation of hook_profile2_access() (profile2 and profile2_og_access submodule use such implementations)
I added the mymodule_profile2_access()
to my module but I don't know how/when it would be called?
$access = module_invoke_all('profile2_access', $op, $profile, $account);
, in theprofile2_access
function. That would be a good place to start debuggingTRUE
, the result will still be access denied if any other module denies access (i.e. returnsFALSE
from their own implementation ofhook_profile2_access
)