function agreement_page in Agreement 6
Same name and namespace in other branches
- 6.2 agreement.module \agreement_page()
- 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 307 - agreement.module - Agreement module code
Code
function agreement_page() {
global $user;
// Redirect anonymous users to the home page.
if (!$user->uid) {
drupal_goto('<front>');
}
$agreement_status = _agreement_status();
$text = check_markup(variable_get('agreement_text', ''), FILTER_FORMAT_DEFAULT, FALSE);
$data = drupal_get_form('agreement_form', $text, $agreement_status, $user->uid);
$output = theme('agreement_page', $data);
return $output;
}