Disable Registration Agreement
(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.
  1. On the admin control panel click the Configuration tab, then click on Settings in the left navigation menu.
  2. Click the Add New Setting tab.
  3. 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
  4. Click the Save Setting button at the bottom of the form.
Step 2: Modify relevant file.

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"))
Thank you for this useful post
Thrive To Make www.obeyafriday.com The Best On MYBB
How do I change to add let's say a subscription upon registrations so members can choose if they want to stay free or Premium (Paid)?

Forum Jump:

Users browsing this thread: 1 Guest(s)