Skip to:
Content
Pages
Categories
Search
Top
Bottom

Want to give role to users


  • shradheya14
    Participant

    @shradheya14

    Hi,

    I have installed bb press plugin on my WordPress website, Now I am getting users by post method from some URL and I want to add those users in DB and provide them Participant as User role.
    So far I have tried many things but was unsuccessful, can you please help me out as it is getting pain in my head now.

    Thanks,
    Shradheya

Viewing 1 replies (of 1 total)

  • Robin W
    Moderator

    @robin-w

    you set the default role in dashboard>settings>forums and when the users first log in the will get it allocated.

    or go to

    Dashboard>users>and amend their profile

    or if you want to do it programmatically or directly in the database, then in usermeta you additionally set

    wp_capabilities which already has their wordpress role, so you just add it to the array

    to say

    a:2:{s:13:”administrator”;s:1:”1″;s:13:”bbp_keymaster”;b:1;}

    a:2:{s:10:”subscriber”;b:1;s:15:”bbp_participant”;b:1;}

    a:2:{s:6:”editor”;b:1;s:13:”bbp_moderator”;b:1;}

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