2021-09-24, 11:26 PM
(2011-11-15, 06:15 PM)ViniH Wrote: Hello,
I realise that this is a fairly old thread, however when people are searching to disable the registration agreement I assume they will read this, and so I thought I would offer you the solution I chose, which is simply to add an on/off option within the "User Registration and Profile Options" settings.
Step 1: Create a new setting.
Step 2: Modify relevant file.
- On the admin control panel click the Configuration tab, then click on Settings in the left navigation menu.
- Click the Add New Setting tab.
- Fill in the form as follows:
- Title: Registration Agreement
- Description: Turns the registration agreement on or off.
- Group: User Registration and Profile Options
- Display Order: 1
- Identifier: reg_agreement
- Type: On/Off Choice
- Value: 1
- Click the Save Setting button at the bottom of the form.
Open member.php in a text-editor and change line 374 from this:
if((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) || $mybb->request_method != "post")
To this:
if($mybb->settings['reg_agreement'] && ((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) || $mybb->request_method != "post"))
Save member.php (and if you edited a local copy you will need to upload the modified version to your web server).
Once you have followed the above steps, you can then turn the registration agreement on or off via the User Registration and Profile Options on the Settings page in the admin area.
This code is correct but with some updates, that line is not the correct line, for the updated method, head to page 762 and replace all code on the line with
if($mybb->settings['reg_agreement'] && ((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) || $mybb->request_method != "post"))