Drupal Association members fund grants that make connections all over the world.
I wanted to let a user select an avatar on the user registration page. Although the "avatar_select" module gave me the option of selecting pictures, it didnt help me with the uploadin bit.. as in i couldnt see an upload ur image field (although i had picture enabled for users). So this is wat i did... hope it helps out some of you
modification to avatar_selection_form_alter() :
look for the if('user_register'==$form_id) part which specifies that u r modifying the registration form...
and add the following lines after $upload=1;
$form['picture'] = array('#type' => 'fieldset', '#title' => t('Picture'), '#weight' => 1);
$form['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', ''));
$form['#attributes']['enctype'] = 'multipart/form-data';