Hi,

I am developing a drupal module where I need to give site wide contact form permissions for all programmatically.

I want this programmatically- http://i.imgur.com/BOQjZB1.png

I need help about this. If any one know how to do this please help me.

Thanks and regards

Gmw Raj

Comments

jaypan’s picture

I would do something like this:

function mymodule_menu_alter(&$menu)
{
  if(isset($menu['contact']))
  {
    $menu['contact']['access callback'] = TRUE;
  }
}

This will open up the form for access by anyone, without having to mess with the permissions table.

Contact me to contract me for D7 -> D10/11 migrations.

gmwraj’s picture

Hi, Jaypan

Thanks for the solution. You solution solve my problem.

Thanks and regards

Raj