MyBB Community Forums

Full Version: Disable Registration Agreement
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
If you want to disable registration Agreement, and want to redirect users directly to user Details page then here is how;

Open member.php and find and remove the following;
	if((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) || $mybb->request_method != "post")
	{
		// Is this user a COPPA user? We need to show the COPPA agreement too
		if($mybb->settings['coppa'] != "disabled" && ($mybb->cookies['coppauser'] == 1 || $under_thirteen))
		{
			if($mybb->settings['coppa'] == "deny")
			{
				error($lang->error_need_to_be_thirteen);
			}
			$lang->coppa_agreement_1 = $lang->sprintf($lang->coppa_agreement_1, $mybb->settings['bbname']);
			eval("\$coppa_agreement = \"".$templates->get("member_register_agreement_coppa")."\";");
		}

		$plugins->run_hooks("member_register_agreement");

		eval("\$agreement = \"".$templates->get("member_register_agreement")."\";");
		output_page($agreement);
	}
	else
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.
Thank You very much. Smile
Thanks it work prefect for me Smile with bouth methods thanks
Thanks
In the last version of MyBB is in the line 415, if the search mode does not run for u Wink
Thanks for this! It worked great.

I am on 1.6.6 and it was on line 387
Damn!

I just know, there is a powerful "hidden" setting usage such ViniH explained
MyBB is Amazing Big Grin
Thanks a lot.
I'll be using this ^^
You're welcome. Smile
Pages: 1 2 3