Replies
Hi Brajesh, thanks for your kindness.
I thought I understood your explanation but something doesn’t work, can you see it where it failed? Thanks very much!!add_action('quform_post_process_7', function (array $result, Quform_Form $form) { if (function_exists('bp_core_signup_user')) { $username = $form->getValueText('quform_7_6'); $email = $form->getValueText('quform_7_6'); $password = $form->getValueText('quform_7_7'); // XProfile fields $usermeta = array( 'field_1' => $form->getValueText('quform_7_10'), //correo 'field_43' => $form->getValueText('quform_7_6'), ); $usermeta['profile_field_ids'] = '1,43'; $usermeta['password'] = wp_hash_password($password); bp_core_signup_user($username, $password, $email, $usermeta, $user_id); update_user_meta( $user_id, 'shop_manager', $new_value ); } return $result; }, 10, 2); function after_bp_activated_user($user_id, $key, $user) { $user = get_userdata($user_id); $role = get_user_meta($user_id, 'shop_manager'); if ($role) { $user->set_role($role[0]); } } add_filter('bp_core_activated_user', 'after_bp_activated_user', 30, 2);
Thank you Brajesh! is there a way to join it to a function to determine that role only for those new users? because I tried but it changes the role in the other registers
Récords
JenniferThanks Brajesh! i hope resolve it! Regards!
HI! Can I serialize it if the form format is based on repeater fields? that is, I don’t have the number of options to put in the array.
Hi Brajesh. thanks for your answer!
No, it isnt.do you mean add something like that?$(document).ready(function(){ $("button").click(function(){ $("div").text($("form").serialize()); }); });
I m thinking that the answer is generate like a repeater fields in xprofile but i didnt know how i can begin
Hi i used the plugin bp-search with this code:
https://wordpress.org/support/topic/autocomplete-the-location/
Regards!Thank you very much Brajesh I am close to being able to do it.
If I succeed, i post it here. Regards!Sure I am making a web that a person answer questions and with his answer he automatically registers.
Then I redirect it to show the closest members that appear geographically and similar xprofile It would be like a suggestion of friendship by location and xprofile.i hope you can understand me.
Thanks!!- Jennifer on October 22, 2019 at 11:56 pm in reply to: [Resolved] Hide tabs and profile for custom roles #26083This reply has been marked as private.
- Jennifer on September 25, 2019 at 10:02 pm in reply to: [Resolved] Redirect subpage of members #25509
excellent!! thanks very much Brajesh!
Regards,