Avatar upload on sign up, s2members
-
Hi,
I’m trying to include an avatar upload field within an s2Member pro form to handle user sign up.
I have a custom form template for s2members which includes the following custom field:
<label for="avatar_upload">Photo Upload: *</label> <input type="file" id="avatar_upload" name="avatar_upload">
I’m having trouble then storing that data when the form is submitted. The code I’m trying is:
add_action('ws_plugin__s2member_during_configure_user_registration', 'store_my_custom_input_fields'); function store_my_custom_input_fields($vars = array()) { $user = $vars['user']; // A WP_user object instance. $_p = stripslashes_deep($_POST); // $_POST vars via form submission. if(!empty($_p['avatar_upload']) && is_string($_p['avatar_upload'])) update_user_option($user->ID, 'avatar_upload', esc_html($_p['avatar_upload'])); }
Any help is appreciated!
Thanks,
Ian
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Avatar upload on sign up, s2members’ is closed to new replies.