Title: bulk option?
Last modified: August 20, 2016

---

# bulk option?

 *  [robotcake](https://wordpress.org/support/users/robotcake/)
 * (@robotcake)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/bulk-option/)
 * Are there a way that I can re-send the welcome e-mail to all users in the platform
   or select a lot of them each time? Because I have created 200 users and input
   the information for them, at this point we would iek them to login their account.
   Thanks in advance!
 * [http://wordpress.org/extend/plugins/re-send-welcome-email/](http://wordpress.org/extend/plugins/re-send-welcome-email/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [giantoctopus_au](https://wordpress.org/support/users/giantoctopus_au/)
 * (@giantoctopus_au)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/bulk-option/#post-3140785)
 * Hi, i had to modify for a client earlier so here is my quick hack. It adds checkboxes
   instead of a dropdown and will loop and send. It currently shows the user id,
   their login and their email address next to each checkbox (you could get user
   meta instead). You can replace everything below (but not including) <form method
   =”POST”> with the following and it should work.
 *     ```
       <form method="POST">
       <p>
       <?php
       $users = get_users('orderby=ID&order=DESC');
   
       foreach ($users as $user) {
   
           $user_info = get_userdata($user->ID);
           $name = $user_info->user_login;
           $useremails = $user_info->user_email;
   
       // uncomment to set value for user id's to select with auto checked.
       /*
       if($user->ID > 240 && $user->ID < 854 ){
       	echo '<input type="checkbox" name="selectedusers[]" value="'.$user->ID.'" checked/> '.$user->ID.' --- '.$name.' ---------- '.$useremails.'<br/>';
       }
       */
   
       // uncomment if you want to select from all users individually.
   
       echo '<input type="checkbox" name="selectedusers[]" value="'.$user->ID.'"/> '.$user->ID.' --- '.$name.' ---------- '.$useremails.'<br/>';
   
       }?>
       </p>
   
           <p class="submit">
           <input type="submit" class="button-primary" value="<?php _e('Send e-mail', 'resend_welcome_email') ?>" />
           </p>
       </form>
       <?php
   
       if (isset($_POST['selectedusers']))
       {
       foreach($_POST['selectedusers'] as $user){
               echo $user;
   
               $uid = $user;
   
       	// Generate a password
       	$password = substr(md5(uniqid(microtime())), 0, 7);
       	$user_info = get_userdata($uid);
   
       	wp_update_user(array('ID' => $uid, 'user_pass' => $password));
   
       	// Send welcome email (there might be a better function for this, I didn't check)
       	wp_new_user_notification($uid, $password);
   
       	$message = sprintf(__('E-mail sent for user %s.', 'resend_welcome_email'), $user_info->user_login);
       	printf('<div id="message" class="updated fade"><p>%s</p></div>', $message);
   
           }
        }
   
       ?>
       </div><?php } ?>
       ```
   
 *  [Randy King](https://wordpress.org/support/users/randyking/)
 * (@randyking)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/bulk-option/#post-3140787)
 * PERFECT! Thank you, Giant Octopus. This did exactly what I needed, and for those
   who come across this page wondering what the heck to do with the above code here
   it is…
 * 1. Click on Plugins->Installed Plugins
    2. Find “Re-Send Welcome Email” by By
   Andreas Baumgartner which you already installed 3. Click on “Edit” under the 
   plugin name 4. Be sure you are editing “re-send-welcome-email.php” 5. Find the
   line that begins <form method=”POST”> 6. Replace to the end of that file with
   the above code 7. NOTE the two areas above where you can comment/un-comment if
   you want to pre-check all the users. I set my range from ID = 2 to 999, un-commenting
   that section and commenting out the section below it. 8. Save the edit 9. Click
   on Users->Re-Send Welcome Email
 * Voila. There they all are, pre-checked (or not) waiting for bulk action.
 * Thanks again – this saved enormous amounts of time for me.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘bulk option?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/re-send-welcome-email.svg)
 * [Re-send Welcome e-mail](https://wordpress.org/plugins/re-send-welcome-email/)
 * [Support Threads](https://wordpress.org/support/plugin/re-send-welcome-email/)
 * [Active Topics](https://wordpress.org/support/plugin/re-send-welcome-email/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/re-send-welcome-email/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/re-send-welcome-email/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Randy King](https://wordpress.org/support/users/randyking/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/bulk-option/#post-3140787)
 * Status: not resolved