Hi,

I would like to add picture upload on the user registration form. I am using the core option profile module.

I added this code via the form_alter function:

$form['public']['picture']['picture_upload'] = array(
'#type' => 'file', '#title' => t('Upload picture'),
'#size' => 48,
'#description' => t('Your virtual face or picture.  Maximum dimensions are %dimensions and the maximum size is %size kB.', array('%dimensions' => variable_get('user_picture_dimensions', '85x85'), '%size' => variable_get('user_picture_file_size', '30'))) .' '. variable_get('user_picture_guidelines', ''));

The upload button appears well and everything SEEMS to be perfect. The only problem is that the picture is not stored in the database ... !

Somebody can provide me with a hint?

Thanks in advance.

Comments

yoeld’s picture

Nobody can provide me with a hint?

I was thinking that maybe i should make dbquery that write into the database. But is the FAPI not taking care of this on its own?

thanks.

Parkes Design’s picture

Try out the Register with Picture module.

http://drupal.org/project/reg_with_pic

yoeld’s picture

Thanks. That was exactly what I was looking for!