MyBB Community Forums

Full Version: Change the defaults for User CP preferences
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When a new user signs up, they have "Receive emails from the Administrators." disabled by default.

How can this be set to enabled?

Same question for all other defaults.

[Image: iZrJO.jpg]
(12-12-2014, 05:18 AM)dandv Wrote: [ -> ][Image: iZrJO.jpg]

I also need different defaults. I need

"Receive PMs from other users"
and
"Hide your email"

enabled by default
.

 Huh Can someone help ? 
Another one looking for the same answer?
(02-21-2015, 11:55 PM)bbq Wrote: [ -> ]"Receive PMs from other users"
and
"Hide your email"

enabled by default
.


You can do it via phpMyAdmin.

Visit "mybb_users" table structure, then change "hideemail" and "receivepms" default to "as defined" and set them to "1".

Changing default value to 1 will result in checkboxes being marked as checked.

You have to do the same to all the settings that you want to be enabled by default.


Note: this will apply to new members only. If you want to change the setting to 1 for all your existing users then you have to run this query via SQL:

http://pastebin.com/N4Ntn31i

^posted on pastebin as cloudflare blocks me
You will need to make a core code edit. You can see the variables defined in member.php and usercp.php

if($mybb->get_input('receivepms', MyBB::INPUT_INT) == 1)
{
$receivepmscheck = "checked=\"checked\"";
}

if($mybb->get_input('pmnotice', MyBB::INPUT_INT) == 1)
{
$pmnoticecheck = " checked=\"checked\"";
}

if($mybb->get_input('pmnotify', MyBB::INPUT_INT) == 1)
{
$pmnotifycheck = "checked=\"checked\"";
}

if($mybb->get_input('invisible', MyBB::INPUT_INT) == 1)
{
$invisiblecheck = "checked=\"checked\"";
}
(08-31-2016, 02:21 PM)Ashley1 Wrote: [ -> ]You will need to make a core code edit. You can see the variables defined in member.php and usercp.php

if($mybb->get_input('receivepms', MyBB::INPUT_INT) == 1)
{
$receivepmscheck = "checked=\"checked\"";
}

if($mybb->get_input('pmnotice', MyBB::INPUT_INT) == 1)
{
$pmnoticecheck = " checked=\"checked\"";
}

if($mybb->get_input('pmnotify', MyBB::INPUT_INT) == 1)
{
$pmnotifycheck = "checked=\"checked\"";
}

if($mybb->get_input('invisible', MyBB::INPUT_INT) == 1)
{
$invisiblecheck = "checked=\"checked\"";
}

Remember that these would require "template conditional" or "php into templates" plugin. Wink
^ No it wouldn't, it just requires editing the core file. You can use the Patches plugin to do this, too.