notification-icon

Basic package is available for $34.99 - One Time Purchase. Buy Now

User Role field

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10002524
    Avatarhenkc
    Participant

    I’d like to include a field on the registration page where different user roles can be selected. I have the WP Roles at Registration plugin installed, but I am unable to figure out a way to either integrate the plugin with the Pie Register plugin or to fix the issue in a different way.

    Any suggestions?

    #10002529
    AvatarPie Register
    Participant

    Hello,

    You can do it in the following way:

    1.) Add a drop-down menu with desired roles manually (Set this field
    hidden on Profile).
    2.) Add a Hook in your theme’s function.php

    add_action('pie_register_after_register_validate','my_custom_user_role_cb',10,1);
    function my_custom_user_role_cb($user){
             //Put your snippet here to assign user
             // You have User Object to retrieve back the Role Option User
    selected with get_user_meta function
    }

    Hope it helps!

    Thanks

    #10002601
    AvatarAlbert Saliba
    Participant

    Hi all,

    I need the same functionality tried the code above but didn’t manage. Can you help me out.

    Albert

    #10002604
    AvatarPie Register
    Participant

    @Albert

    Hello,

    The above code is just an example of how one should get started.

    Thanks
    Mohsin

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Pie-Register 2.0 Support’ is closed to new topics and replies.