WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/25/2015 10:37:35 PM (6 years ago)
Author:
ocean90
Message:

Users: Allow to create users without sending an email to the new user.

This adds a checkbox to wp-admin/user-new.php to prevent sending an email with the username and a password reset link to the new user. Restores the behavior of pre-4.3.

Fixes #33504.
Props tharsheblows, SergeyBiryukov, DrewAPicture, ocean90.

File:
1 edited

Legend:

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

    r35725 r35742  
    21992199 * @since 4.4.0
    22002200 *
    2201  * @param int $user_id ID of the newly created user.
    2202  */
    2203 function wp_send_new_user_notifications( $user_id ) {
    2204     wp_new_user_notification( $user_id, null, 'both' );
     2201 * @param int    $user_id ID of the newly created user.
     2202 * @param string $notify  Optional. Type of notification that should happen. Accepts 'admin' or an empty string
     2203 *                        (admin only), or 'both' (admin and user). Default 'both'.
     2204 */
     2205function wp_send_new_user_notifications( $user_id, $notify = 'both' ) {
     2206    wp_new_user_notification( $user_id, null, $notify );
    22052207}
    22062208
Note: See TracChangeset for help on using the changeset viewer.