Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress interferes with wpForms User Registration


  • waprothero
    Participant

    @waprothero

    I use wpForms “User Registration”,version 2.2.0 for user registration for my site. However, I found that wpForms user registration form is no longer setting the role that I have specified in wpForms. I found that if I deactivated the bbPress plugin, then the new user’s default role was set as specified in wpForms. So, something in bbPress is interfering with the wpForms setting.

    I am using bbPress version 2.6.9

    This is a critical error. Any help solving this would be MUCH appreciated.

Viewing 16 replies - 1 through 16 (of 16 total)

  • Robin W
    Moderator

    @robin-w

    as a test, let’s stop it adding the forum role on registration to see if that is interfering.

    so use this code

    add_action ('plugins_loaded' , 'rew_remove_bbp_role') ;
    
    function rew_remove_bbp_role () {
    	remove_action( 'bbp_user_register',   'bbp_user_add_role_on_register', 10, 1 );
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    and then let me know if this makes a difference


    waprothero
    Participant

    @waprothero

    Robin, thanks for your response. I’m out of town until Monday and will try out your suggestions then. Some quick question tho. I’m an experienced programmer, but not with wordpress. I’m unclear where to insert these code items. So….
    _———-here’s your suggestion
    so use this code

    —where do I add this this.. To the bbPress functions file?
    add_action (‘plugins_loaded’ , ‘rew_remove_bbp_role’) ;

    function rew_remove_bbp_role () {
    remove_action( ‘bbp_user_register’, ‘bbp_user_add_role_on_register’, 10, 1 );
    }

    Put this in your child theme’s function file –
    I am guessing this goes in wp initiation file.

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme


    Robin W
    Moderator

    @robin-w

    ok, for the moment, I’d suggest you add the code snippets plugin, that gives you an area to put it in.

    That will let us test to get to a problem definition.

    Once we know if this (or something else) is the solution, then we can get it into the right place, but I would prefer to be sure that the code is functioning so code snippets gives that certainty


    waprothero
    Participant

    @waprothero

    Robin:
    Following your simple instructions for a snippet, I just wanted to check to make sure I’m making the test you suggested (thanks, btw):

    Snippet Content, using wpCode snippet plugin:

    add-action(‘plugins_loaded’,’rew_remove_bbp_role’);
    function rew_remove_bb_role'(){
    remove_action( ‘bbp_user_register’,’bbp_user_add_role_on_register’,10,1);
    }

    Snippet location: Universal Snippet

    Is this correct?


    Robin W
    Moderator

    @robin-w

    yes that looks right.

    Has it done anything ?


    waprothero
    Participant

    @waprothero

    Robin:
    I did the test, several times, clearing caches, etc, etc.
    No change. The default role is still blank. No change.

    At the top of the page, I see the snippet, so it’s running.


    Robin W
    Moderator

    @robin-w

    ok, let me look further


    waprothero
    Participant

    @waprothero

    By the way, it did set the bbPress role to “Participant”, which is what I wanted for that person. However, for the main wp user role, which is essential for other parts of the web site, it left it blank.

    I can set the wordpress user role to the “Subscriber” role, manually in the dashboard. Unfortunately, after the user logs in, they will not be able to see other content that requires the “Subscriber” role to be set in the wordpress default role assignment system.


    Robin W
    Moderator

    @robin-w

    Can you ask this question in wp forms support, as this is a paid plugin I have no access to it to see what it is doing.


    waprothero
    Participant

    @waprothero

    Robin,
    wpForms was only minimal help. They told me it was bbPress problem. They did tell me that the user role was set when the user who is registering clicks the “acknowledge” link. It seems that bbPress is setting the user role to empty after wpForms sets it. So, is there a snippet that could set the user role to “Subscriber” that would activate after bbPress sets the user role and forum role?

    Almost all new users will be subscribers and only a very few will be different, and I don;t mind setting those manually.


    waprothero
    Participant

    @waprothero

    Another thought…Is there any setting in the bbstylepack plugin that could affect,the wordpress user role setting? I have only seen ways of configuring the forum role setting, and the wpform registration plugin has a setting form that maps the Forum Role to the wp dasboardd user settings.


    Robin W
    Moderator

    @robin-w

    ok, let’s try the standard fault finding :

    Themes

    As a test switch to a default theme such as twentytwenty, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error, starting with wpforms, and then style pack.

    Then come back


    waprothero
    Participant

    @waprothero

    Robin:
    I have already found that bbPress, if inactivated, the problem goes away. Are you thinking that another plugin might be part of the process?


    Robin W
    Moderator

    @robin-w

    it can be combinations, so yes, I want to eliminate that.

    Given that at the moment I have the problem as :

    On registration:

    worpdress has no role
    bbpress has participant role

    so you need subscriber role to be set

    then I am struggling to see how bbpress is ‘unsetting’ the subscriber role.


    waprothero
    Participant

    @waprothero

    ROBIN,
    OK, I understand. I will work on that.
    Thanks.


    careerdoctor
    Participant

    @careerdoctor

    Hello I am wondering whether this issue was investigated any further.

    I have the same issue where WP Forms User Add On registration is not assigning a user role on approval.

    When I deactivate the BBPress plugin. the problem goes away.

Viewing 16 replies - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.
Skip to toolbar