User roles in sub-sites
- This topic has 1 reply, 2 voices, and was last updated 9 years, 4 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
We’ve got several custom roles (students, staff, faculty, alumni) created using User Role Editor Pro in our main Commons site. However, when anyone creates a sub-site, and they get to the blog setup screen, their default member options only include the default roles (admin, editor, author, contributor, subscriber). So when any current user logs-in to the sub-site their role is assigned as one of the defaults rather than the new roles we defined above. Is there a way to show an expanded list of available roles in the blog setup screen (see screenshot)?
Is there a recommended plugin for bulk reassigning roles in the sub-sites to conform to each user’s correct role?
Hi Basem,
Judging from your screenshot, the settings screen is from the BP Groupblog plugin.
You’ll want to override BP Groupblog’s blog form with your own.
To do this, copy the bp_groupblog_signup_form()
function:
https://github.com/boonebgorges/bp-groupblog/blob/master/bp-groupblog.php#L822
Rename your new function to something else and add in your custom roles to this function.
Next, you’ll want to unhook BP Groupblog’s current blog form and tell BP Groupblog to use yoru custom one:
https://github.com/boonebgorges/bp-groupblog/blob/master/bp-groupblog-classes.php#L41,L42
https://github.com/boonebgorges/bp-groupblog/blob/master/bp-groupblog-classes.php#L66,L67
Something like this:
http://pastebin.com/2ccUHRRb
Untested, but hopefully that should give you some ideas.