MyBB Hacks

Full Version: Stop sex field change.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to stop users from changing their Sex after registration, as it is a required field.

This, because there is a group for men and other for women, that is it. (Obviusly, "undisclosed" option is avaible so only admins will be able to change it is users ask for it.)

Can somebody tell me the basic plugi "idea" for this Ouch?
You can try to make it as a required-non editable fields?
An easy way to do this would be to delete it (or put it as a comment <!-- code here -->) in User CP template.
User CP > usercp_profile > Edit:


Go to Configuration > "Additional fields in profile" > Sex > Edit:
Look at last two options.
(02-03-2012 02:35 AM)Zenk Wrote: [ -> ]An easy way to do this would be to delete it (or put it as a comment <!-- code here -->) in User CP template.
User CP > usercp_profile > Edit:


Go to Configuration > "Additional fields in profile" > Sex > Edit:
Look at last two options.

If I use those options, fields are still editable by the users without limitation at a time.... is it not?

(02-03-2012 02:32 AM)RateU Wrote: [ -> ]You can try to make it as a required-non editable fields?

Never read of somebody trying so (and I dinĀ“t as well), will try and report back.

Thanks both of you.
That din't worked, users are able to choose sex field in registration, but it looks like not being saved in the DB. When I check the user's profilefrom a Admin account, it is not being showed.
Ah, yes. It seems that MyBB not save the profile fields value.
Why the profile fields is displayed on the registration page?
Because it shows the profile field if the field is required, but doesn't save the data if the user can't edit the profile field. Yes, it doesn't make any sense.
Any clue about this?
You can try this plugin (attached).
It takes fid3 as Sex profile field.
Make it as a required-editable profile field.
In registration, it will try to force a user to choose Male or Female only.
In UserCP, whatever the user's fid3 value set, it will try to prevent it to be changed (you can use ModCP or AdminCP to change the value).
Reference URL's