Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change role assigned to User when they create a Group

  • @sirspacey

    Member

    I’d like to give the user a different role than “Administrator” when they create a group. In my case I’d like the name of the role to be “Team Captain,” and for them to only have power over the content they create (similar to author role) instead of power over the content site-wide.

    Can anyone clue me in on how to change this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • @sirspacey

    Member

    Found this code on how to manage roles in Buddypress: http://cleverness.org/2011/01/27/updated-buddypress-user-roles-code/

    @sirspacey

    Member

    However, it doesn’t handle the assignment process when a group is created, any hints?

    @modemlooper

    Moderator

    You create a function and add action so when a user creates a group it hits that function and switches user type. The code shows how to do it for blogs. I’m not sure off top of head what the call is for group creation, it could be bp_create_group or bp_new_group

    add_action( ‘bp_create_group’, ‘customroles_group_role’, 10, 3 );

    @sirspacey

    Member

    cool thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change role assigned to User when they create a Group’ is closed to new replies.
Skip to toolbar