You are here

function agreement_page in Agreement 6.2

Same name and namespace in other branches
  1. 6 agreement.module \agreement_page()
  2. 7.2 agreement.pages.inc \agreement_page()

Callback for agreement URL

1 string reference to 'agreement_page'
agreement_menu in ./agreement.module
Implementation of hook_menu().

File

./agreement.module, line 350
agreement.module - Agreement module code

Code

function agreement_page() {
  global $user;

  // Redirect anonymous users to the home page.
  if (!$user->uid) {
    drupal_goto('<front>');
  }
  $text = check_markup(variable_get('agreement_text', ''), variable_get('agreement_format', AGREEMENT_FORMAT), FALSE);
  $output = theme('agreement_page', drupal_get_form('agreement_form', $text, _agreement_status(), $user->uid));
  return $output;
}