Disable emails for new user registration
Considering your code to be working, simply put it in a plugin. It should then work!
Considering your code to be working, simply put it in a plugin. It should then work!
It’s not going to show you previous history before the plugin was activated, there’s no way to do that as you have to have the plugin activated for it to log and store those. This is not something done by default in WordPress. What you need to do instead is to enable WordPress debugging, and … Read more
meta_query orderby sort multiple keys
fine-grained capabilities for user related capabilities
How to prevent deleteting specific user?
Direct modification of WP database is a very bad idea. In your case, you have problem because you avoid caching. WordPress caches almost everything what is able to cache, and user data are not the exclusion. When you call username_exists(), it returns information from the cache, not from the database. You should use wp_update_user() to … Read more
Should be ‘meta_key’ => ‘last_name’ instead of ‘meta_key’ => ‘user_lastname’ $args = array( ‘meta_query’ => array( array( ‘key’ => ‘pw_user_status’, ‘value’ => ‘approved’ , ), ), ‘orderby’ => ‘meta_value’, ‘meta_key’ => ‘last_name’, ‘order’ => ‘ASC’ ); $users = get_users( $args );
Use this code on your child theme’s functions.php file.. //Hide for non-logged-in users (public visitors) function bp_logged_out_page_template_redirect() { if( ! is_user_logged_in() && is_page( ‘members’ ) || is_page( ‘activity’ ) || bp_is_user() ) { wp_redirect( home_url( ‘/register/’ ) ); exit(); } } add_action( ‘template_redirect’, ‘bp_logged_out_page_template_redirect’ ); The above snippet will do: •IF the user is not … Read more
You can use the REST API to list users: /wp-json/wp/v2/users Add that to the end of your website URL. Plugins such as Wordfence can prevent anonymous users from accessing this. You can also disable the REST API if you do not use it.
There is an argument for this, and it is documented. If you look at the documentation for get_users() is says this: See WP_User_Query::prepare_query(). for more information on accepted arguments. If you follow that link you’ll see the list of arguments, and one of those is: ‘has_published_posts’ (bool|array) Pass an array of post types to filter … Read more