WordPress.org

Make WordPress Core

Changeset 11319


Ignore:
Timestamp:
05/13/09 22:35:17 (6 years ago)
Author:
ryan
Message:

Add option to send password to users created from admin. Props Denis-de-Bernardy. fixes #9669

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/user.php

    r11292 r11319  
    184184    } else { 
    185185        $user_id = wp_insert_user( get_object_vars( $user )); 
    186         wp_new_user_notification( $user_id ); 
     186        wp_new_user_notification( $user_id, isset($_POST['send_password']) ? $pass1 : '' ); 
    187187    } 
    188188    return $user_id; 
  • trunk/wp-admin/user-new.php

    r11204 r11319  
    8888        $$var = isset($_POST[$post_field]) ? stripslashes($_POST[$post_field]) : ''; 
    8989} 
     90$new_user_send_password = !$_POST || isset($_POST['send_password']); 
    9091?> 
    9192<table class="form-table"> 
     
    118119        <input name="pass2" type="password" id="pass2" autocomplete="off"/></td> 
    119120    </tr> 
     121    <tr> 
     122        <th scope="row"><label for="send_password"><?php _e('Send Password?') ?></label></th> 
     123        <td><label for="send_password"><input type="checkbox" name="send_password" id="send_password" <?php checked($new_user_send_password, true); ?> /> <?php _e('Send this password to the new user by email.'); ?></label></td> 
     124    </tr> 
    120125<?php endif; ?> 
    121126 
Note: See TracChangeset for help on using the changeset viewer.