Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Plugin update first_name, last_name in wp_usermeta on activation

Hey, the entire best way to get a response from me is to give my plugins some advertising!

Let’s see. Those thingies are called arguments. As you have probably figured out, ‘wpmu_activate_user’ action is called from wpmu-functions.php line 1208 (on my development server files, at least).

First two arguments are obvious. When an account is registered, a new records is made in the wp_signups database table. There is a column called $meta, which is a seralized PHP array. $meta as in the wpmu_activate_user argument, is the unseralized version of that array for the user that has just activated his/her account.

On one of my test users, it seems to contains keys: field_1, xprofile_fields_ids (not sure), avatar_image_resized (bool) and avatar_image_original (bool).

So as you’ve suggested above, I reckon you can just use $meta[‘field_1’]. Let us know!

EDIT: the code you’ve pasted above. You’ll need to have all three arguments, even if you don’t want to use them all. You can miss out ones AFTER the one you want, but you can’t miss anything out before the one you wish to use.

Skip to toolbar