trustedlogin / Remove-Dashboard-Access

This WordPress plugin limits user access to the dashboard based on whether users have a chosen capability. Disallowed users are redirected to a chosen URL.
https://wordpress.org/plugins/remove-dashboard-access-for-non-admins/
49 stars 12 forks source link

bbPress and BuddyPress Compatibility #3

Closed lucaskeiser closed 9 years ago

lucaskeiser commented 9 years ago

This plugin is not compatible with bbPress and BuddyPress in it's current format.

Notice: bbp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 2.3.) in/wp-includes/functions.php on line 3547 Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in /wp-includes/functions.php on line 3547

This is easy enough to fix. In remove-dashboard-access.php wrap everything after line 15 in a function and then add add_action( 'init', 'your_function'); and everything should work fine.

lucaskeiser commented 9 years ago

It might also need to be added for admin_init but I'm not positive.

DrewAPicture commented 9 years ago

Hi, thanks for the issue. However, this has already been reported in #2.