I add picture in profile users. Set path where save file-picture.
2 moments - not correct.

1 - while i himself not create path and set 666 perm. - not work upload (need check - if path not found - created before save)
2 - when create user - upload not work - while i login user and edit his profile - bad very bad

Comments

wowik73’s picture

Title: Image not uploaded in signup » Image not uploaded in signup - resolved part 2

If you add in form element file - need add enctype = 'multipart/form-data';
------------------------------------

function profile_pictures_form_alter(&$form, &$form_state, $form_id) {
...
elseif (($form_id == 'user_profile_form') || ($form_id == 'user_register') || ($form_id == 'profile_form_profile')) {
+ $picture = false;
...
if ($field->type != 'picture') {
+ $picture = true;
continue;
}
...
$form['#validate'][] = 'profile_picture_validate';
+ if ($picture)
+ $form['#attributes']['enctype'] = 'multipart/form-data';

wowik73’s picture

3 Need add picture options - if not present picture - use this default picture ...

yeputons’s picture

Title: Image not uploaded in signup - resolved part 2 » Image not uploaded in signup
Status: Active » Fixed

Created separate issues: #889222: Automatically picture upload directory creation (if not exists) and #889228: Default picture for field (like in core profile.module).
wowik73, please create separate issues and don't write a lot of requests in one issue.

Fixed #886510: Image not uploaded in signup by yeputons (reported by wowik73): added form enctype for correct work in user creation form.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.