New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: [Resolved] comment plugin #21080
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: [Resolved] comment plugin #21074
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    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

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    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

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    You are welcome.

    All the best 🙂

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: BuddyPress Message Privacy #21066

    Thank you. Will update here after releasing the plugin.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Thank you Edward.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on 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

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: [Resolved] login redirect issues #21063

    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

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    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