Replies
- This reply has been marked as private.
- This reply has been marked as private.
- Brajesh Singh on February 21, 2019 at 4:33 pm in reply to: [Resolved] xprofile verify if custom field data exist on registration #21073
Hi,
Welcome to BuddyDev and thank you for asking the question.You can do it on bp_signup_validate action. I am showing it with a example. You will need to check for duplicate on your own as I am not sure how are you storing or from which table you want to check for the data(Is it the profile data table?)
You will also need to know the field id to find the submitted content
/** * Validation error. */ function budydev_custom_validate_signup() { $field_id = 32;// please change with your field id. $field = isset( $_POST[ 'field_' . $field_id ] ) ? trim( $_POST[ 'field_' . $field_id ] ) : ''; // validate your field // from database // and if there is any error, // add the error to BuddyPress as buddypress()->signup->errors[ 'field_' . $field_id ] = "Your error message"; } add_action( 'bp_signup_validate', 'budydev_custom_validate_signup' );Regards
Brajesh - Brajesh Singh on February 21, 2019 at 4:19 pm in reply to: [Resolved] I want the registration to complete after clicking the registration email link #21071
Hi Kristian,
Yes, This is easily doable.You may use the following code
/** * Activate and redirect. */ function buddydev_auto_activate_redirect() { $key = bp_get_current_activation_key(); if ( $key ) { bp_core_activate_signup( $key ); bp_core_redirect( site_url( '/about/' ) ); } } add_action( 'bp_template_redirect', 'buddydev_auto_activate_redirect' );Hope that helps.
Regards
Brajesh - Brajesh Singh on February 21, 2019 at 3:04 pm in reply to: [Resolved] How do I get BuddyPress group name from id? #21068
You are welcome.
All the best 🙂
Regards
Brajesh Thank you. Will update here after releasing the plugin.
Regards
Brajesh- Brajesh Singh on February 21, 2019 at 2:56 pm in reply to: Censoring bad words/ swear words in Buddypress activities and private messages #21065
Thank you Edward.
Regards
Brajesh - Brajesh Singh on February 21, 2019 at 2:56 pm in reply to: BuddyPress Ajax Registration – social login #21064
You are welcome.
Since the plugin is hosted on wp.org, The notification will be available in your dashboard.
I will write here too.
Thank you
Brajesh Hi Mike,
Thank you.
I have tested ajax registration and BP Auto Activate Auto Login now and the custom code from your first post worked as expected.Please let me know if the theme developers have some feedback about login redirect?
Thank you
Brajesh- Brajesh Singh on February 21, 2019 at 2:53 pm in reply to: [Resolved] How do I get BuddyPress group name from id? #21062
Hi Torben,
Sure.You can use the following
bp_get_group_name( groups_get_group( $group_id));Where $group_id is your actual group id.
Regards
Brajesh