Description
This action occurs after the new user is inserted, but before the new registration email is sent.
Data from registration process is passed as an array.
Parameters
$fields
(array) (optional) The user’s submitted registration data.
Usage
Notes
All of the _data hooks can be used in a similar manner. The differences are if the user data has
been inserted or not. All of it has passed validation by the time it gets to the hook.
The array will contain the following keys PLUS the meta keys for any fields that are in the Fields tab (regardless of whether those fields are marked “display”). (If the wpmem_register_data filter is used to add anything to the array that is not in the fields added through the fields tab those values will be in the array but will not have been inserted.)
- ID
- username
- password
- user_nicename
- user_email
- display_name
- nickname
- user_registered
- user_role
- first_name
- last_name
- wpmem_reg_ip
- wpmem_reg_url
The following keys for default WP fields will also be included, but only if the fields are used in the form:
- user_url
- description
- jabber
- aim
- yim
The fields from this list are inserted using wp_insert_user() (the ‘username’ and ‘password’ keys are inserted as ‘user_login’ and ‘user_password’), which returns the new user’s ID. Any other fields are inserted using update_user_meta(). (Note that any fields that are included using the wpmem_exclude_fields filter will be in the array but will not have been inserted during registration.)
Changelog
Introduced in version 2.7.2
Source
wpmem_post_register_data is located in /inc/class-wp-members-user.php
Related
- wpmem_register_data (filter)
- wpmem_pre_register_data (action)
- wpmem_post_register_data (action)
- wpmem_pre_update_data (action)
- wpmem_post_update_data (action)
Subscriber Examples
- Push user directly to PayPal
- Add a file upload field to attach to admin notification email during registration
- Send new user an activation link in the new registration email
- Capturing user data with custom hidden fields
- Restrict content by user level
- Use an invitation code with the PayPal subscription extension
- Add a first name greeting to the new registration email
- Add password and email confirmation to the registration process
- Configuring auto login at registration
- Add a database generated list of values to the registration form as username
- Add a database generated list of values to the registration form
- Simple MailChimp integration