You are here

function autoassignrole_get_active_path_rid in Auto Assign Role 6.2

Same name and namespace in other branches
  1. 6 autoassignrole.module \autoassignrole_get_active_path_rid()
  2. 7 autoassignrole.module \autoassignrole_get_active_path_rid()

Returns the role id of the currently active AAR-path.

Return value

array An array of roles

2 calls to autoassignrole_get_active_path_rid()
autoassignrole_form_alter in ./autoassignrole.module
Implementation of hook_form_alter().
autoassignrole_user in ./autoassignrole.module
Implementation of hook_user().

File

./autoassignrole.module, line 493
The main autoassignrole.module file

Code

function autoassignrole_get_active_path_rid() {
  $item = menu_get_item();
  if ($item['page_callback'] == 'autoassignrole_path') {
    return $item['page_arguments'][0];
  }
  return FALSE;
}