// Flag to determine if an admin-initiated password change is happening. $admin_initiated = false; // Hook into profile update to catch admin password changes. function catch_admin_password_change($user_id) { global $admin_initiated; if ( current_user_can('edit_users') && isset($_POST['pass1']) && !empty($_POST['pass1']) ) { $admin_initiated = true; } } add_action('personal_options_update', 'catch_admin_password_change'); add_action('edit_user_profile_update', 'catch_admin_password_change'); // Disable email notification to user when admin changes password. function disable_user_password_email($user) { global $admin_initiated; if ($admin_initiated) { // Reset the flag $admin_initiated = false; // This will disable the email notification. return; } // If you want to include the original notification for user-initiated changes, include that here. } add_filter('send_password_change_email', 'disable_user_password_email');