Comments

off’s picture

Subscribe

damienmckenna’s picture

Title: Drupal 7 port » Drupal 7 port of Register with Picture

Subscribe.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new1.62 KB
new9.16 KB

Here's what I came up with. It has two hook implementations and doesn't need the separate admin page, instead just adding a new setting to the user settings form. I've also bundled a full zip of the two remaining files, to make it easier for people to test.

This patch sponsored by Bluespark Labs.

damienmckenna’s picture

StatusFileSize
new1.67 KB
new9.45 KB

A small update that hides the "current picture" display.

basicmagic.net’s picture

subscribe

damienmckenna’s picture

StatusFileSize
new1.75 KB
new9.54 KB

Another update, this time it only changes the registration form if the $form['picture'] elements exist.

mmilano’s picture

Status: Needs review » Needs work

Thanks Damien & Blue Spark Labs. I've applied the patch and branched a 7.x-1.x version of the project. It should appear in the releases later today.

Just some notes for me later:

Upon testing, I got this error after submitting a registration:

Notice: Object of class stdClass could not be converted to int in drupal_write_record() (line 6733 of /path-to-drupal-install/includes/common.inc).

The picture did get attached to the profile just fine.

Require picture functionality was lost with the patch. That will be on my TODO list as well.

Loikkk’s picture

Hello everyone,

I can't use Drush to patch Register with Picture due to my webhost plan. Is it possible to have a ready D7 version compressed.
In order to add that feature to my website.

Thank you in advance :)

damienmckenna’s picture

@Loikkk: I posted a zip above of the full module.

Loikkk’s picture

@DamienMcKenna : Thanks ;)

bryancasler’s picture

Any possibility this will get pushed to a d7 branch?

bryancasler’s picture

I would also add that this module isn't working for me. When I have the picture required, each time I tried to submit the user registration form it tells me I have no picture uploaded. When I have the picture not required, each time I submit the user registration form, no photo is uploaded.

bryancasler’s picture

Bump for any update on this and what it would take to get these bugs hashed out.

damienmckenna’s picture

I'm aiming to work on it again within the next few weeks.. fingers crossed!

bryancasler’s picture

This is great news. I will happily test anything you throw my way.

404’s picture

subscribe

404’s picture

sorry, i accidentally changed the status of the issue? Someone who knows how to revert the change, please do so. Sorry.

damienmckenna’s picture

@404: no, you didn't change it, "Needs work" is the correct status.

omnyx’s picture

subscribing. This would be a great addition to Drupal 7.x

liliplanet’s picture

subscribe thx!

boran’s picture

Status: Needs review » Needs work

I pulled the 7.x from git. The module installed fine, and a new Picture section is visible in the registration form.
This picture section of the form allows file to be selected. However, I don't see a button to actually transfer the file, maybe this is normal in D7.

When the registration is completed it informs me that the image was re-dimensioned to the maximum allow size (good), but then also complains that the Picture is obligatory, i.e. as if no picture was selected.

If the following line in _form_alter() is disabled, the upload works fine, and the picture is visible in the user profile:
$form['picture']['picture_upload']['#required'] = variable_get('reg_with_pic_required', 0);

I'm not sure how to debug this one, dpm() can't be used in the registration form.

mmilano’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs work » Needs review

I just re-wrote reg with pic to work for Drupal 7. You can download it here if it's not on the project page yet: http://drupal.org/node/192600/release (7.x-1.x)

Admin -> Config -> Account settings

Here you will see a checkbox to enable it, then a text field for the weight of the picture field on the registration form. That should be all there is too it. Of course pictures on that same settings page need to be enabled.

It works for me. If anyone wants to test it out, I can get a stable release out soon.

Fidelix’s picture

Sub

boran’s picture

I pulled the latest from git, ignoring the changes I'd made above.
Its works just fine, the picture can be uploaded during registration.

mmilano’s picture

Status: Needs work » Needs review

Thanks boron.

If anyone else installs it this week, please post here, working or not. Depending on the feedback, or if I just don't hear anything, I'll make an official release later this week.

poldrack’s picture

I get this error after registration:

Object of class stdClass could not be converted to int in drupal_write_record()

mmilano’s picture

can you post the entire error? that doesn't tell me much.

Vasiliy Grotov’s picture

#26
I've got this error too.

Notice: Object of class stdClass could not be converted to int in drupal_write_record() (line 6841 of \includes\common.inc

j_ten_man’s picture

StatusFileSize
new2.87 KB

Here's a fix for the Issue that #26 and #28 are seeing. The issue had to do with the fact that $user->picture was set to the picture file object upon initial insert. I changed the hook that is handling the saving of users to one that is called just before the user object is saved the first time (but after the picture is already handled by the user module).

j_ten_man’s picture

StatusFileSize
new2.87 KB

Sorry - Drupal site is being weird not showing my comments.

j_ten_man’s picture

StatusFileSize
new2.87 KB

Sorry - Drupal site is being weird not showing my comments.

mmilano’s picture

thanks j_ten_man, the patch is much appreciated. i'm pretty busy through this weekend but i'll get the patch in and create a new release within a few days.

mmilano’s picture

Status: Needs review » Fixed

@j_ten_man confirmed patch worked great. thanks again.

committed, added .install file to enable by default, and released 1.0.

Status: Fixed » Closed (fixed)

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