@monicadavisf ohh, he was Lucas? I was trying to remember what I had actually seen him in, but didn't care enough to go to imdb.

Add bbPress Default Role

When integrating bbPress and WordPress and using only the WordPress registration, no default role was assigned to the user in bbPress. This will give the user a role of member in bbPress. Just activate, and whenever a user signs up, they will automatically have the bbPress role assigned. Note: this is not retroactive; it is only for new registrations.

Code

function insertbbPressRole($insert_id) {
	$capability = maybe_unserialize('a:1:{s:6:"member";b:1;}');
	update_usermeta($insert_id,'bb_capabilities',$capability);
}

add_action('user_register', 'insertbbPressRole');

Download Plugin

Written while working for Matrix Group International.

Me, Trevor Davis. My blue steel face…

Hi, I’m Trevor Davis

I’m a 25 year old Front-End Developer living in Arlington, VA. I work full-time at Viget Labs and freelance on the side.

I specialize in CSS, HTML, jQuery, WordPress & ExpressionEngine. See more of my work, and then hire me.

Recent Work

  • 4th District IBEW Health Fund
  • Employers Council on Flexible Compensation
  • Monica Davis
  • The National Christmas Tree
  • Matrix Group International
  • The MatriX Files
  • Wireless Career
  • George Washington Wired
  • Direct Selling 411
  • Makeup Bizz
  • InstallNET
  • National Park Foundation
See More of My Work

Asides