Changeset 4185
- Timestamp:
- 09/04/2012 08:36:05 AM (12 years ago)
- Location:
- branches/plugin/bbp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-core-actions.php
r4181 r4185 114 114 115 115 // Multisite Global Forum Access 116 add_action( 'bbp_setup_current_user', 'bbp_ global_access_role_mask', 10 );116 add_action( 'bbp_setup_current_user', 'bbp_set_current_user_default_role', 10 ); 117 117 118 118 // Widgets … … 224 224 add_action( 'make_ham_user', 'bbp_make_ham_user' ); 225 225 add_action( 'make_spam_user', 'bbp_make_spam_user' ); 226 227 // User role228 add_action( 'bbp_new_topic', 'bbp_global_access_auto_role' );229 add_action( 'bbp_new_reply', 'bbp_global_access_auto_role' );230 226 231 227 // Caches -
branches/plugin/bbp-includes/bbp-core-caps.php
r4184 r4185 751 751 752 752 /** 753 * Add the default role and mapped bbPress capsto the current user if needed753 * Add the default role to the current user if needed 754 754 * 755 755 * This function will bail if the forum is not global in a multisite 756 756 * installation of WordPress, or if the user is marked as spam or deleted. 757 *758 * Note that we do not currently add a capability for the default role of the759 * site. This is to prevent unauthorized role-based access, since we have no760 * idea what plugins might be doing to that role. This may change in the future,761 * so it's best not to rely heavily on this for now.762 757 * 763 758 * @since bbPress (r3380) … … 768 763 * @uses current_user_can() 769 764 * @uses get_option() 770 * @uses bbp_get_caps_for_role()771 765 * 772 766 * @return If not multisite, not global, or user is deleted/spammed 773 767 */ 774 function bbp_ global_access_role_mask() {768 function bbp_set_current_user_default_role() { 775 769 776 770 // Bail if forum is not global … … 786 780 return; 787 781 788 // Assign the role and mapped capsto the current user782 // Assign the default role to the current user 789 783 bbpress()->current_user->set_role( get_option( 'default_role', 'subscriber' ) ); 790 784 }
Note: See TracChangeset
for help on using the changeset viewer.