How to delete user from MU site when the user is removed from their site?

The function you are looking for is wpmu_delete_user($user->ID) I wrote a small plugin to delete users across the whole network by role: <?php /** * Plugin Name: Regbox Delete multisite users * Plugin URI: http://www.regbox.se/delete-multisite-users * Description: Delete users by role across network * Version: 0.1 * Author: Adam Rehal * Author URI: http://www.regbox.se * … Read more

Create one-use post dynamically, add to main query, do not insert post (user profile view)

From what I understand you are trying to change the permalink structure of the user, so instead of showing yoursite.com/author/yourusername it will show yoursite/profile/yourusername? You can add a rewrite rule to the permalink structure to make that change: function yourdomain_user_rewrite() { global $wp_rewrite; $wp_rewrite->author_base=”profile”; $wp_rewrite->author_structure=”https://wordpress.stackexchange.com/” . $wp_rewrite->author_base . ‘/%author%’; } add_action( ‘init’, ‘yourdomain_user_rewrite’ ); Then … Read more

What hooks do I need to hook into to capture ever wp_user creation/change?

Those first 2 actions you linked to from the codex, user_register and profile_update should be exactly what you need. user_register runs right after a user has successfully registered and gives you access to their $user_id which you can use to retrieve any user data you need, like name, email, etc. add_action( ‘user_register’, ‘wse_custom_register_action’, 10, 1 … Read more

Add Link to Users List (Backend) to open each users front-end profile

The following will add a “View author profile” link to the row actions (i.e., the links that appear when you hover over the username): add_filter (‘user_row_actions’, ‘add_view_author_page’, 10, 2) ; function add_view_author_page ($actions, $user) { $href = esc_attr (get_author_posts_url ($user->ID)) ; $actions[‘add_view_author_page’] = “<a href=”https://wordpress.stackexchange.com/questions/259665/$href”>View author page</a>” ; return ($actions) ; } Edit: Or if … Read more

List all users and current week entries

If by “made an entry” you mean “has published at least 1 post”, then following will do it (with the proviso given below): $args = array ( ‘role’ => ‘spectator’, ) ; $spectators = new WP_User_Query ($args) ; $users_with_recent_posts = array () ; foreach ($spectators->get_results () as $user) { $args = array ( // if … Read more