diff options
author | Evan Winslow <evan@elgg.org> | 2011-03-18 22:25:02 -0700 |
---|---|---|
committer | Evan Winslow <evan@elgg.org> | 2011-03-18 22:25:02 -0700 |
commit | 198cd62a80dbc685d8e10686e81c7b5a4a2f2773 (patch) | |
tree | a2edd1abacf09699c1525630a0fa2e563535dd64 /start.php | |
parent | 9e4ac3d0d5b24cd6c91b33a5402fb5e636df61f4 (diff) | |
download | elgg-198cd62a80dbc685d8e10686e81c7b5a4a2f2773.tar.gz elgg-198cd62a80dbc685d8e10686e81c7b5a4a2f2773.tar.bz2 |
Cleaned up registration terms and updated to 1.8 style
Upped version.
Diffstat (limited to 'start.php')
-rw-r--r-- | start.php | 37 |
1 files changed, 14 insertions, 23 deletions
@@ -1,28 +1,19 @@ <?php -/******************************************************************************* - * registrationterms - * - * @author Administrator - ******************************************************************************/ - function registrationterms_init() - { - global $CONFIG; +function registrationterms_init() { + //put the terms agreement at the very end + elgg_extend_view('register/extend', 'registrationterms/register', 1000); - //put the terms agreement at the very end - extend_view('register/extend', 'registrationterms/register', 1000); - - //block user registration if they don't check the box - register_plugin_hook('action', 'register', 'registrationterms_register_hook'); - } - - function registrationterms_register_hook() - { - if (get_input('agreetoterms',false) != 'true') { - register_error(elgg_echo('agreetoterms:required')); - forward($_SERVER['HTTP_REFERER']); - } + //block user registration if they don't check the box + elgg_register_plugin_hook_handler('action', 'register', 'registrationterms_register_hook'); +} + +function registrationterms_register_hook() { + if (get_input('agreetoterms', false) != 'true') { + register_error(elgg_echo('registrationterms:required')); + forward(REFERER); } - - register_elgg_event_handler('init', 'system', 'registrationterms_init'); +} + +elgg_register_elgg_event_handler('init', 'system', 'registrationterms_init'); ?>
\ No newline at end of file |