Changeset 33620
- Timestamp:
- 08/17/2015 02:24:43 PM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/user.php
r33601 r33620 177 177 } else { 178 178 $user_id = wp_insert_user( $user ); 179 wp_new_user_notification( $user_id );179 wp_new_user_notification( $user_id, 'both' ); 180 180 } 181 181 return $user_id; -
trunk/src/wp-admin/network/site-new.php
r33082 r33620 80 80 wp_die( __( 'There was an error creating the user.' ) ); 81 81 else 82 wp_new_user_notification( $user_id, $password);82 wp_new_user_notification( $user_id, 'both' ); 83 83 } 84 84 -
trunk/src/wp-admin/network/site-users.php
r33603 r33620 78 78 $update = 'err_new_dup'; 79 79 } else { 80 wp_new_user_notification( $user_id, $password);80 wp_new_user_notification( $user_id, 'both' ); 81 81 add_user_to_blog( $id, $user_id, $_POST['new_role'] ); 82 82 $update = 'newuser'; -
trunk/src/wp-admin/network/user-new.php
r33494 r33620 52 52 $add_user_errors = new WP_Error( 'add_user_fail', __( 'Cannot add user.' ) ); 53 53 } else { 54 wp_new_user_notification( $user_id, $password);54 wp_new_user_notification( $user_id, 'both' ); 55 55 wp_redirect( add_query_arg( array('update' => 'added'), 'user-new.php' ) ); 56 56 exit; -
trunk/src/wp-includes/pluggable.php
r33246 r33620 1689 1689 * 1690 1690 * @since 2.0.0 1691 * 1692 * @param int $user_id User ID. 1693 */ 1694 function wp_new_user_notification($user_id) { 1691 * @since 4.3.0 The `$plaintext_pass` parameter was changed to `$notify`. 1692 * 1693 * @param int $user_id User ID. 1694 * @param string $notify Whether admin and user should be notified ('both') or 1695 * only the admin ('admin' or empty). 1696 */ 1697 function wp_new_user_notification( $user_id, $notify = '' ) { 1695 1698 global $wpdb; 1696 1699 $user = get_userdata( $user_id ); … … 1706 1709 @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message); 1707 1710 1711 if ( 'admin' === $notify || empty( $notify ) ) { 1712 return; 1713 } 1714 1708 1715 // Generate something random for a password reset key. 1709 1716 $key = wp_generate_password( 20, false ); 1710 1717 1718 /** This action is documented in wp-login.php */ 1711 1719 do_action( 'retrieve_password_key', $user->user_login, $key ); 1712 1720 … … 1726 1734 1727 1735 wp_mail($user->user_email, sprintf(__('[%s] Your username and password info'), $blogname), $message); 1728 1729 1736 } 1730 1737 endif; -
trunk/src/wp-includes/user.php
r33486 r33620 2620 2620 update_user_option( $user_id, 'default_password_nag', true, true ); //Set up the Password change nag. 2621 2621 2622 wp_new_user_notification( $user_id );2622 wp_new_user_notification( $user_id, 'both' ); 2623 2623 2624 2624 return $user_id;
Note: See TracChangeset
for help on using the changeset viewer.