Suppose When I add a membership product item in my shopping cart through join function of membership entity module, and after removing same membership item I am unable to access same membership page, showing the page access denied due to calling "hook_membership_entity_access",
I want to add single membership and want to remove previous membership that I added recently.
Even I am unable to implement the hook_membership_entity_access by my custom module thats code are given below.
Please help me solve it critical issue.

function ids_membership_membership_entity_access($op, $membership = NULL, $account = NULL) {
if ($op == 'join') {
return TRUE;
}
}

Comments

tanzeel.expert created an issue. See original summary.

draenen’s picture

Priority: Critical » Normal
Status: Active » Closed (works as designed)

If any one module (ie. implementation of hook_membership_entity_access()) returns FALSE for an operation then access is denied. This is the same way node_access checks work in core. If you really want to allow access to the join operation under any condition, you can override the menu item access callback in hook_menu_alter()