How to require custom fields How to require custom fields
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

How to require custom fields

Started by aszasz, January 25, 2005, 09:00:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aszasz

I would like to require users who upload photos to complete the first of the four custom fields ('user1' in database, '$user_field1_name' in code).  If they do not complete custom field 1 when they upload a photo, they will see an error message and will not be allowed to upload that file (however, they can return to the upload page and try again).

I am deep into the code of the file: upload.php (beautifully written and commented code, by the way - a pleasure to work with).  I have located the error-checking section of the code (starting around line 1140).  My question is, at this point in the code, where are the custom field values kept?  They are not in the file_upload_array, nor are they, obviously, in the escrow_array yet, nor are they in the database (duh).  Can I get them from $_POST or $_GET?  

Where can I find the value of $user_field1_name at this point in the code so that I can check to make sure it's not empty?

Thanks in advance for any help.