BuddyDev

Search

Buddypress roles resetting when activated

  • Participant
    will on #16282

    Hi,

    I have “register as” with two options on the registration field, but when accounts are activated they reset themselves to the normal default role.

    What’s a fix for this?

    http://www.naturettl.com/hub/register

    Thanks.

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

    Hi Will,
    In BuddyPress 3.0, A function was introduced to set default role for user

    
    bp_members_add_role_after_activation
    

    It works on the action ‘bp_core_activated_user’ at priority 1.

    The function that you are using to set role should be moved to ‘bp_core_activated_user’ with lower priority(say 9) and your role setting will work.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved