Support

Home Forums Event Espresso Premium WP User Integration stops working on 4.6-beta.144

WP User Integration stops working on 4.6-beta.144

Posted: January 29, 2015 at 5:00 am

Viewing 3 reply threads


emarienborg

January 29, 2015 at 5:00 am

Hi!

I just upgraded from 4.5.0-beta32 to 4.6-beta.144. I’m also running version 1.0.0.dev.001 of the WP Users extension/plugin, that integrates EE attendees with the WP user library.

After the beta.144 update, part of the WP Users functionality won’t work.

When logged in, the registration form is populated with excisting information. So, that part’s working.

But registered information isn’t updated.

I’ve added some debug logging to the actionAddAttendeeAsWPUser function, and it seems like it fails because the registrant array is formatted differently than before.

The function is trying to get the existing user by this code:

$user = get_user_by( 'email', $registrant[ 'email' ] );

But this fails. Outputting the registrant array shows that the actual information is nested further down in the array. Can that be the reason it won’t work? Here’s the registrant array for a test registration:


Registrant array: Array
(
[personal-information-1399634989] => Array
(
[fname] => Eivind
[lname] => den Fjerde
[email] => eivind.myemailaddress@gmail.com
)

[additional_attendee_reg_info] => 1
[address-information-1399634989] => Array
(
[phone] => 34646346
[address] => Karl Johans Gate 34
[zip] => 0141
[city] => Oslo
)

[annet] => Array
(
[14] => Array
(
)

[13] =>
)

[primary_registrant] => 1-e647e7448241e31e3a3f0b9a97f7f747
)

Just to test, I made a function that fetches the registration email based on the reg_url ([primary_registrant]).

When that is used in stead, the update works. The problem then is that the user is simply blanked out, because the submitted information in the registration form no longer lies in the same place, so this bit of code is not working as intended:


wp_update_user(
array(
'ID' => $user_id,
'nickname' => $registrant[ 'fname' ] . ' ' . $registrant[ 'lname' ],
'display_name' => $registrant[ 'fname' ] . ' ' . $registrant[ 'lname' ],
'first_name' => $registrant[ 'fname' ],
'last_name' => $registrant[ 'lname' ],
'description' => __( 'Registrert ved eventpåmelding.', 'event_espresso' ),
'show_admin_bar_front' => false,
)
);

I’m no expert in PHP, so I’m not sure if it’s at all possible, but would it be possible to “wildcard” the first array, so that accessing the information could be done anyways, e.g. like this?

$registrant[*][ 'fname' ]

Hope to hear back from you guys as soon as possible on how to fix this, or with an update to the WP Users plugin/extension.

All the best,
Eivind
๐Ÿ™‚


emarienborg

January 29, 2015 at 5:02 am

(And you might want to fix your forum post box here – below the textarea I’m told that using the code-tag will work, but when I press the code button above the textarea I get something else. So, I used the code tag, and the markup of my previous post got messed up. Hope you still get the idea.)


Lorenzo Orlando Caum

  • Support Staff

January 29, 2015 at 10:40 am

Hi Eivind,

The WP User Integration was an initial release for 4.5. It is under development and certain areas are being rewritten. Unfortunately, I cannot provide an estimate of when it will be updated and it isn’t recommended for a production site at this time.


Lorenzo


emarienborg

January 29, 2015 at 11:02 am

Okaj, thanks. I’ve already rewritten that plugin to such an extent that I might as well just get my own attendee information as well, I think, hehe. Thanks for your reply ๐Ÿ™‚

Viewing 3 reply threads

The support post ‘WP User Integration stops working on 4.6-beta.144’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso