I have a form. When it is submitted, it redirects to another path in the Module.

When that path is called, the access code I have for that is the following (in the menu):

$items[] = array('path' => 'register',
'title' => t('Membership'),
'callback' => 'drupal_get_form',
'callback arguments' => 'membership_form',
//'access' => user_access('anonymous'), //<-- I tried this as well
'access' => 'anonymous',
'type' => MENU_CALLBACK,
);

and the Permissions are:

function register_perm()
{
return array('register');
}

--which I have set for both authenticated user and anonymous user. So according to me both users should be able to access this. But this simply shows Access denied. You dont have authorization to access this Page....

Any clue?

Comments

neochief’s picture

Have you tried to refresh access cache?

criznach’s picture

Try...

'access' => TRUE,

elyobo’s picture

run "TRUNCATE cache_menu" in your database; this clears the menu cache, which is where the permissions are cached.