function taxonomy_access_enable_role_url in Taxonomy Access Control 7
Generates a URL to enable a role with a token for CSRF protection.
Parameters
int $rid: The role ID.
Return value
string The full URL for the request path.
1 call to taxonomy_access_enable_role_url()
- taxonomy_access_admin_role in ./
taxonomy_access.admin.inc - Form constructor for a form to manage grants by role.
File
- ./
taxonomy_access.admin.inc, line 109 - Administrative interface for taxonomy access control.
Code
function taxonomy_access_enable_role_url($rid) {
// Create a query array with a token to validate the sumbission.
$query = drupal_get_destination();
$query['token'] = drupal_get_token($rid);
// Build and return the URL with the token and destination.
return url(TAXONOMY_ACCESS_CONFIG . "/role/{$rid}/enable", array(
'query' => $query,
));
}