BuddyDev

Search

Problem with member type

  • Participant
    Level: Initiated
    Posts: 18
    Julien ROUSSEL on #6763

    Hi,

    Here is the code of my bp-custom.php file:
    http://syframework.alwaysdata.net/3vw

    I have 2 types of members on my website, “artist” and “art lover”, I create 2 profile field, in my registration form, we see the 2 new profile fields, after The user has no type of member in the wordpress administration, I would like to know how it is done so that a user is automatically recognized as “artist” or “art lover”?

    Julien

  • Participant
    Level: Initiated
    Posts: 18
    Julien ROUSSEL on #6766

    Nobody to help me please?

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #6774

    Hi Justin,
    There is no way to do it automatically. I suggest you either set member type on the account activation or you may us our plugin BuddyPress Xprofile Member Type Field to do that for you.

    https://buddydev.com/plugins/bp-xprofile-member-type-field/

    Hope that helps.

  • Participant
    Level: Initiated
    Posts: 18
    Julien ROUSSEL on #6779

    Hi,

    This plugin is already installed, with each new member, it is necessary to edit the type of member manually? But how to know if it is an artist or an art lover.

    On my registration form, there is a choice between 2 types of members

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #6785

    Hi Julien,
    I am sorry but I don’t understand the problem. Why don’t create a member type field and let users choose that? That way you will have it automatically done for you.

    One suggestion, please do not use space in the name of the member type. It is fine in the labels but you should not use it in the name.

  • Participant
    Level: Initiated
    Posts: 18
    Julien ROUSSEL on #6826
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #6839
    This reply has been marked as private.
  • Participant
    Level: Initiated
    Posts: 18
    Julien ROUSSEL on #6845

    Hi,

    For the member type problem, I found the problem!

    For the other problem:

    The problem comes from the new version of wordpress!
    Users are put on hold. Before the update of WordPress, the members was activated automatically with the following php code:

    function disable_activation_email() {
    return false;
    }
    add_filter( ‘bp_core_signup_send_activation_key’, ‘disable_activation_email’ );

    /// Désactive la fonction mail
    add_filter( ‘bp_registration_needs_activation’, ‘__return_false’ );

    ————–

    I found another php code but it’s almost the same as the code above:

    // define the bp_core_signup_send_activation_key callback
    function filter_bp_core_signup_send_activation_key( $true, $user_id, $user_email, $activation_key, $usermeta ) {
    // make filter magic happen here…
    return $true;
    };

    // add the filter
    add_filter( ‘bp_core_signup_send_activation_key’, ‘filter_bp_core_signup_send_activation_key’, 10, 5 );

You must be logged in to reply to this topic.

This topic is: not resolved