Disable Registration Agreement
#1
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
Reply
#2
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.
Reply
#3
Thank You very much. Smile
Reply
#4
Thanks it work prefect for me Smile with bouth methods thanks
[Image: 25314.png]
Reply
#5
Thanks
Reply
#6
In the last version of MyBB is in the line 415, if the search mode does not run for u Wink
Reply
#7
Thanks for this! It worked great.

I am on 1.6.6 and it was on line 387
Reply
#8
Damn!

I just know, there is a powerful "hidden" setting usage such ViniH explained
MyBB is Amazing Big Grin
Hello, Welcome to MyBB Indonesia to get local support
My 'Simple' Unique Plugin here Smile
Reply
#9
Thanks a lot.
I'll be using this ^^
[Image: 40DS6Te.png]

Reply
#10
You're welcome. Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)