PDA

View Full Version : Need Help with Force Required Custom Profile Field


evenmonkeys
02-13-2011, 07:19 AM
So when you set "Field Required" to "Yes, Always" and when you set "Field Editable by User" to "Yes" it would normally force all members of the site to fill out that information first before they can do anything else. However, I have an exception to this rule that I can't figure out. I'm using a modification that creates a custom page for profile fields. If you read the (?) on "Field Required" it says this:
Yes, always - User will be required to complete this field at registration. Enabling this setting will force all users to complete it before they can continue using your forum. This applies only if the field is shown on the "Edit Your Details" page.
Well, it's not on "Edit Your Profile." It's in "Extra Profile." I've been looking through PHP files for two hours and I'm about to cry. I found in "global.php" where it says this:// ################################################## ###########################
// check required profile fields
if ($vbulletin->session->vars['profileupdate'] AND THIS_SCRIPT != 'login' AND THIS_SCRIPT != 'profile')
{
$vbulletin->options['useforumjump'] = 0;
eval(standard_error(fetch_error('updateprofilefiel ds', $vbulletin->session->vars['sessionurl'])));
}However.. I can't tell what it's doing. A bit more than I know. Ultimately, it's not forcing members to fill the information out so I figured this is why. So if someone could help me out.. I'd love you forever.

kh99
02-13-2011, 01:58 PM
That code you posted shows an error if the user hasn't filled out the required profile fields, if it's not the login or profile page. It looks like $vbulletin->session->vars['profileupdate'] is the flag that says whether profile fields need to be filled in. It looks like that flag is set to 1 in include/functions.php in exec_shut_down().

But I'm not sure I understand your problem - is it showing the error even though your fields shouldn't be required, or do you you want a mod that shows the message even though your field is not on the "Edit Your Profile" page?

evenmonkeys
02-13-2011, 10:23 PM
I want a modification that shows the error even if it's not on the "Edit Your Profile" page! That's what I need. When it's checking for people who haven't filled out the information yet, it only checks that one page. I want it to check any page.

evenmonkeys
02-17-2011, 12:05 AM
Nothin?