You are here

function rabbit_hole_access_php in Rabbit Hole 7.2

Checks if current user can specify rules using php.

If the php module isn't enabled this function will always return FALSE. This is done to prevent users using the php rules to execute arbitary code on the site.

Parameters

string $module: The name of the module the user is changing the rule for.

Return value

bool TRUE if the user can use php, otherwise FALSE.

2 calls to rabbit_hole_access_php()
rabbit_hole_form in ./rabbit_hole.module
Form structure for the Rabbit Hole configuration.
rabbit_hole_form_validate in ./rabbit_hole.module
Validation callback for the Rabbit Hole form.

File

./rabbit_hole.module, line 424
Main module file for Rabbit Hole.

Code

function rabbit_hole_access_php($module) {

  // Don't allow if the php module isn't enabled.
  if (!module_exists('php')) {
    return FALSE;
  }
  return user_access('php redirect ' . $module);
}