New user created as Participant rather than Contributor [closed]
So the answer it seems is a bug in the plugin BP Disable Activation Reloaded: http://wordpress.org/support/topic/user-role-bp-20-21
So the answer it seems is a bug in the plugin BP Disable Activation Reloaded: http://wordpress.org/support/topic/user-role-bp-20-21
Read User Access paragraph on the Codex here: Multisite Network Administration
According to the Codes on capabilities the manage_sites and manage_network_users should grant these options, or am I not reading correctly? Apparently, the capabilities here are not enough. Check out wp-admin/network.php. You’ll see it dies if the current user fails the is_super_admin check. This check gets the $super_admins global from get_super_admins and returns false if the … Read more
Figured my comment would actually make a better answer, so here we go. You can hook other methods within the plugin class onto admin_init (for the admin side) within the constructor, like so: class Plugin_Class { public function __construct() { add_action( ‘admin_init’, array( $this, ‘some_other_method’ ) ); } public function some_other_method() { // do something … Read more
I know this is old, but this is the best way. Might help people coming here in the future. $get_users = get_users( array( ‘blog_id’ => get_current_blog_id() ) ); $user_id = $get_users[0]->ID;
This is right. You can use WordPress in exactly the same way as you were using your OLD CMS. WordPress is being used by Top newspapers / magazines and websites and they’ve editors / authors and bloggers and ofcourse they have groups & roles. CNN, Mashabale, TechCrunch, etc are all based on WordPress. There are … Read more
I assume your WP settings is New User Default Role = contributor If yes, so this block of code shows all the contributor’s with account_status = approved; $args = array( ‘role’ => ‘contributor’, ‘meta_key’ => ‘account_status’, ‘meta_value’ => ‘approved’ ); $users = get_users($args); foreach ($users as $user) { echo ‘<pre>’; print_r( $user ); echo ‘</pre>’; … Read more
if( is_admin() ) { add_filter( ‘init’, ‘custom_restrict_pages_from_admin’ ); } function custom_restrict_pages_from_admin() { global $pagenow; $arr = array( ‘update-core.php’, ‘edit.php’ ); if( custom_check_user_roles() && in_array( $pagenow , $arr ) ) { //echo some custom messages or call the functions } else { echo ‘This page has restricted access to specific roles’; wp_die(); } } function custom_check_user_roles() … Read more
Because of this line in wp-admin/admin.php: if ( current_user_can( ‘manage_options’ ) ) { wp_raise_memory_limit( ‘admin’ ); } In other words, WordPress raises the memory limit to WP_MAX_MEMORY_LIMIT within the admin, but only for users with the manage_options capability i.e. administrators. Your best bet is to raise the default memory limit in your wp-config.php: define( ‘WP_MEMORY_LIMIT’, … Read more
I found a better workaround using the same filter suggested by @ben-casey in his answer. Firstly I registered throuhg register_rest_field all the custom fields of all the user types I have in the database. Then in rest_prepare_user, insted adding the wanted fields, I removed the unwanted ones. In this way I can still use the … Read more