Changeset 34251
- Timestamp:
- 09/16/2015 10:18:33 PM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/user.php
r34116 r34251 177 177 } else { 178 178 $user_id = wp_insert_user( $user ); 179 wp_new_user_notification( $user_id, null, 'both' ); 179 /** 180 * Fires after a new user has been created. 181 * 182 * @since 4.4.0 183 * 184 * @param int $user_id ID of the newly created user. 185 */ 186 do_action( 'edit_user_created_user', $user_id ); 180 187 } 181 188 return $user_id; -
trunk/src/wp-admin/network/site-new.php
r34116 r34251 92 92 $password = wp_generate_password( 12, false ); 93 93 $user_id = wpmu_create_user( $domain, $password, $email ); 94 if ( false === $user_id ) 94 if ( false === $user_id ) { 95 95 wp_die( __( 'There was an error creating the user.' ) ); 96 else 97 wp_new_user_notification( $user_id, null, 'both' ); 96 } 97 98 /** 99 * Fires after a new user has been created via the network site-new.php page. 100 * 101 * @since 4.4.0 102 * 103 * @param int $user_id ID of the newly created user. 104 */ 105 do_action( 'network_site_new_created_user', $user_id ); 98 106 } 99 107 -
trunk/src/wp-admin/network/site-users.php
r34116 r34251 78 78 $update = 'err_new_dup'; 79 79 } else { 80 wp_new_user_notification( $user_id, null, 'both' );81 80 add_user_to_blog( $id, $user_id, $_POST['new_role'] ); 82 81 $update = 'newuser'; 82 /** 83 * Fires after a user has been created via the network site-users.php page. 84 * 85 * @since 4.4.0 86 * 87 * @param int $user_id ID of the newly created user. 88 */ 89 do_action( 'network_site_users_created_user', $user_id ); 83 90 } 84 91 } -
trunk/src/wp-admin/network/user-new.php
r34218 r34251 52 52 $add_user_errors = new WP_Error( 'add_user_fail', __( 'Cannot add user.' ) ); 53 53 } else { 54 wp_new_user_notification( $user_id, null, 'both' ); 54 /** 55 * Fires after a new user has been created via the network user-new.php page. 56 * 57 * @since 4.4.0 58 * 59 * @param int $user_id ID of the newly created user. 60 */ 61 do_action( 'network_user_new_created_user', $user_id ); 55 62 wp_redirect( add_query_arg( array('update' => 'added'), 'user-new.php' ) ); 56 63 exit; -
trunk/src/wp-includes/default-filters.php
r34124 r34251 340 340 add_action( 'comment_post', 'wp_new_comment_notify_postauthor' ); 341 341 add_action( 'after_password_reset', 'wp_password_change_notification' ); 342 add_action( 'register_new_user', 'wp_send_new_user_notifications' ); 343 add_action( 'edit_user_created_user', 'wp_send_new_user_notifications' ); 342 344 343 345 /** -
trunk/src/wp-includes/ms-default-filters.php
r34112 r34251 28 28 add_action( 'wpmu_activate_user', 'wpmu_welcome_user_notification', 10, 3 ); 29 29 add_action( 'after_signup_user', 'wpmu_signup_user_notification', 10, 4 ); 30 add_action( 'network_site_new_created_user', 'wp_send_new_user_notifications' ); 31 add_action( 'network_site_users_created_user', 'wp_send_new_user_notifications' ); 32 add_action( 'network_user_new_created_user', 'wp_send_new_user_notifications' ); 30 33 add_filter( 'sanitize_user', 'strtolower' ); 31 34 -
trunk/src/wp-includes/user-functions.php
r34218 r34251 2024 2024 update_user_option( $user_id, 'default_password_nag', true, true ); //Set up the Password change nag. 2025 2025 2026 /** 2027 * Fires after a new user registration has been recorded. 2028 * 2029 * @since 4.4.0 2030 * 2031 * @param int $user_id ID of the newly registered user. 2032 */ 2033 do_action( 'register_new_user', $user_id ); 2034 2035 return $user_id; 2036 } 2037 2038 /** 2039 * Initiate email notifications related to the creation of new users. 2040 * 2041 * Notifications are sent both to the site admin and to the newly created user. 2042 * 2043 * @since 4.4.0 2044 * 2045 * @param int $user_id ID of the newly created user. 2046 */ 2047 function wp_send_new_user_notifications( $user_id ) { 2026 2048 wp_new_user_notification( $user_id, null, 'both' ); 2027 2028 return $user_id;2029 2049 } 2030 2050
Note: See TracChangeset
for help on using the changeset viewer.