adding picture on user registration form

yoeld - June 20, 2009 - 16:59

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.

Nobody can provide me with a

yoeld - June 21, 2009 - 16:48

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.

Try out the Register with

Parkes Design - June 29, 2009 - 16:35

Try out the Register with Picture module.

http://drupal.org/project/reg_with_pic

Thanks. That was exactly what

yoeld - July 1, 2009 - 21:16

Thanks. That was exactly what I was looking for!

 
 

Drupal is a registered trademark of Dries Buytaert.