You are here

function book_access_remove_user_permissions in Book access 6

Show the confirmation form to remove the permissions a user have for a book.

1 string reference to 'book_access_remove_user_permissions'
book_access_menu in ./book_access.module
Implements hook_menu().

File

./book_access.admin.inc, line 265
Administration interface for the Book access module.

Code

function book_access_remove_user_permissions($form_state, $node, $user) {
  $form = array(
    '#bid' => $node->book['bid'],
    '#uid' => $user->uid,
  );
  if ($top_node = node_load($node->book['bid'])) {
    $title = $top_node->title;
  }
  else {
    $title = '#' . $node->book['bid'];
  }
  return confirm_form($form, t('Are you sure you want to remove the user %user permissions for the book %title?', array(
    '%user' => $user->name,
    '%title' => $title,
  )), 'node/' . $node->book['bid'] . '/book_access', t('This action cannot be undone.'), t('Remove'));
}