Diff Revisions 464 vs 521 for /branches/0.9/functions/register.php

Diff revisions: vs.
464 521   <- Revisions
       
      Diff lines for:
 Rev 464 : Lines 10 -> 18
 Rev 521 : Lines 10 -> 22
10 10 Suite 300, San Francisco, California, 94105, USA.
11 11 Additional license terms at http://eocms.com/license.html
12 12 */
13 - function register($username, $password, $vpassword, $email, $token, $captcha) {
13 + function register($username, $password, $vpassword, $email, $token, $captcha, $tos) {
14 14 global $settings;
15 15 call('checktoken', $token);
16 + if(!empty($settings['tos']) && $tos != 'on') {
17 + $_SESSION['error'] = 'You must agree to the Terms of Service to register';
18 + return false;
19 + }
16 20 if($settings['register_captcha'] =='on')
17 21 $captcha = call('captchacheck', $captcha);
18 22 if($settings['register_captcha'] =='on' && $captcha == false)