File | Lines added | Lines deleted |
---|---|---|
inc/admin/users/users.php | 2 | 0 |
inc/dispatch/dispatch.php | 1 | 0 |
inc/user.inc.php | 10 | 0 |
inc/user/settings.php | 1 | 0 |
File inc/admin/users/users.php changed (mode: 100644) (index 8a473d6..576500d) | |||
... | ... | switch ($_op) { | |
13 | 13 | case 'add': // add | case 'add': // add |
14 | 14 | case 'edit': // edit | case 'edit': // edit |
15 | 15 | $rg['ask_for_pass'] = 1; | $rg['ask_for_pass'] = 1; |
16 | // if admin creates the user, s/he already accepted tos (or not needed) | ||
17 | $rg['no_tos'] = 1; | ||
16 | 18 | $_admin_users .= rg_user_edit_high_level($db, $rg); | $_admin_users .= rg_user_edit_high_level($db, $rg); |
17 | 19 | $_show_list = 0; | $_show_list = 0; |
18 | 20 | break; | break; |
File inc/dispatch/dispatch.php changed (mode: 100644) (index eebcc18..6fe5607) | |||
... | ... | case 'forgot_send': // forgot pass - send mail | |
52 | 52 | ||
53 | 53 | case 'create_account': | case 'create_account': |
54 | 54 | $rg['ask_for_pass'] = 1; | $rg['ask_for_pass'] = 1; |
55 | $rg['no_tos'] = 0; | ||
55 | 56 | $body .= rg_user_edit_high_level($db, $rg); | $body .= rg_user_edit_high_level($db, $rg); |
56 | 57 | break; | break; |
57 | 58 |
File inc/user.inc.php changed (mode: 100644) (index cd8bf1e..0525fa3) | |||
... | ... | function rg_user_edit_high_level($db, &$rg) | |
1447 | 1447 | $ui['rights'] = rg_rights_checkboxes("user", "rights", "C"); // TODO | $ui['rights'] = rg_rights_checkboxes("user", "rights", "C"); // TODO |
1448 | 1448 | $ui['plan_id'] = 0; | $ui['plan_id'] = 0; |
1449 | 1449 | $ui['session_time'] = $rg_session_time; | $ui['session_time'] = $rg_session_time; |
1450 | $ui['tos'] = 1; | ||
1450 | 1451 | } | } |
1451 | 1452 | } | } |
1452 | 1453 | ||
... | ... | function rg_user_edit_high_level($db, &$rg) | |
1468 | 1469 | $ui['plan_id'] = rg_var_uint("plan_id"); | $ui['plan_id'] = rg_var_uint("plan_id"); |
1469 | 1470 | $ui['session_time'] = rg_var_uint("session_time"); | $ui['session_time'] = rg_var_uint("session_time"); |
1470 | 1471 | $ui['confirm_token'] = rg_id(20); | $ui['confirm_token'] = rg_id(20); |
1472 | if ($rg['no_tos'] == 1) | ||
1473 | $ui['tos'] = 1; | ||
1474 | else | ||
1475 | $ui['tos'] = rg_var_uint('tos'); | ||
1476 | |||
1477 | if ($ui['tos'] != 1) { | ||
1478 | $errmsg[] = rg_template('user/tos_deny.html', $rg, FALSE /*xss*/); | ||
1479 | break; | ||
1480 | } | ||
1471 | 1481 | ||
1472 | 1482 | if (!rg_valid_referer()) { | if (!rg_valid_referer()) { |
1473 | 1483 | $errmsg[] = "invalid referer; try again"; | $errmsg[] = "invalid referer; try again"; |
File inc/user/settings.php changed (mode: 100644) (index a376fe8..ded67c6) | |||
... | ... | $_subop = empty($paras) ? "edit_info" : array_shift($paras); | |
16 | 16 | switch ($_subop) { | switch ($_subop) { |
17 | 17 | case 'edit_info': | case 'edit_info': |
18 | 18 | $rg['ask_for_pass'] = 0; | $rg['ask_for_pass'] = 0; |
19 | $rg['no_tos'] = 1; // we ask for only for account creation | ||
19 | 20 | $_settings .= rg_user_edit_high_level($db, $rg); | $_settings .= rg_user_edit_high_level($db, $rg); |
20 | 21 | break; | break; |
21 | 22 |