MyBB Community Forums
Disable Registration Agreement - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: Tutorials (https://community.mybb.com/forum-38.html)
+--- Thread: Disable Registration Agreement (/thread-92606.html)

Pages: 1 2


Disable Registration Agreement - Yaldaram - 04-19-2011

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



RE: Disable Registration Agreement - ViniH - 11-15-2011

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.



RE: Disable Registration Agreement - Yaldaram - 11-15-2011

Thank You very much. Smile


RE: Disable Registration Agreement - haytoch - 11-17-2011

Thanks it work prefect for me Smile with bouth methods thanks


RE: Disable Registration Agreement - Yaldaram - 11-18-2011

Thanks


RE: Disable Registration Agreement - quecarallo - 07-28-2012

In the last version of MyBB is in the line 415, if the search mode does not run for u Wink


RE: Disable Registration Agreement - mrdon515 - 10-18-2012

Thanks for this! It worked great.

I am on 1.6.6 and it was on line 387


RE: Disable Registration Agreement - FBI - 01-18-2013

Damn!

I just know, there is a powerful "hidden" setting usage such ViniH explained
MyBB is Amazing Big Grin


RE: Disable Registration Agreement - alv4 - 01-26-2013

Thanks a lot.
I'll be using this ^^


RE: Disable Registration Agreement - Yaldaram - 01-27-2013

You're welcome. Smile