MyBB Community Forums

Full Version: make custom profile fields un editable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi
i want some of my profile fields to be required at rgistration and i want the user to enter his data(such as name & last name)
but i don't want them to be able to edit these fields after they have been approved by admin

is there a way to do it
you could try and make them only editable by admin, no idea if it will work as i've not tried it.
Then they won't be able to set it at registration. The only way to do this would be via a plugin.
Well i Hope there will be one
And i hope it'll be possible without a plugin in next mybb versions! !!!!
SO no one is helping?
ACP > Configurations > Custom profile Fields > Edit that Custom Field > and Set the options as follows;
Required? = Yes
Editable by user? = No
Hide on profile? = No (Your choice)

Save.

Now open ./member.php file and find;
		$query = $db->simple_select("profilefields", "*", "editable=1", array('order_by' => 'disporder'));
and Change it into;
		$query = $db->simple_select("profilefields", "*", "editable=0", array('order_by' => 'disporder'));

Now when the new user register, he/she can able to edit that field, after registration, he will not be able to edit it again. Wink
Thanks a lot
But Doesn't this apply to all Custom fields?
It suits me perfectly But just for some people it might not be enough..
One More question

Shouldn't i set this option to yes?
Quote:Editable by user? = No
I guess editing the core file in that manner will make it uneditable

Right?ExclamationHuh
totally Wrong
Thank you
But as i said it suits me but it's a downside that it affects all custom fields!!
Sorry to bother again
But someone just signed up in my forum without filling any of the fields i marked as required!!!
Did that code edit cause it?
In the Custom Profile Field edit page, did you set Required? to "Yes" ?
Yes
It's not that they are not entering the data
It's not getting stored in database!!!
I signed up myself!!
I guess since i have selected them as uneditable they're not being entered in database
the code change we made is just making the fields appear on registration page!!
Pages: 1 2